Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 4c56606

Browse files
committed
Fix tests some more
1 parent bf18dd8 commit 4c56606

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/GitHub.Api/Helpers/AssemblyResources.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,12 @@ Each file's name is their physical path in the project.
5454

5555
// if we're not in the test runner, we might be running in a Unity-compiled GitHub.Unity assembly, which doesn't
5656
// embed the resources in the assembly
57-
if (!Guard.InUnitTestRunner)
57+
// check the filesystem
58+
NPath possiblePath = environment.ExtensionInstallPath.Combine(type, os, resource);
59+
if (possiblePath.FileExists())
5860
{
59-
// check the filesystem
60-
NPath possiblePath = environment.ExtensionInstallPath.Combine(type, os, resource);
61-
if (possiblePath.FileExists())
62-
{
63-
target.DeleteIfExists();
64-
return possiblePath.Copy(target);
65-
}
61+
target.DeleteIfExists();
62+
return possiblePath.Copy(target);
6663
}
6764
return NPath.Default;
6865
}

src/GitHub.Api/Installer/UnzipTask.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public UnzipTask(CancellationToken token, NPath archiveFilePath, NPath extracted
1616
{
1717
this.archiveFilePath = archiveFilePath;
1818
this.extractedPath = extractedPath;
19-
this.zipHelper = zipHelper;
19+
this.zipHelper = zipHelper ?? ZipHelper.Instance;
2020
this.fileSystem = fileSystem;
2121
Name = $"Unzip {archiveFilePath.FileName}";
2222
}

0 commit comments

Comments
 (0)