Skip to content

Commit

Permalink
Merge pull request #190 from atifaziz/fix/nuget-pkgs-override-path
Browse files Browse the repository at this point in the history
  • Loading branch information
tonybaloney authored Sep 10, 2024
2 parents c7817ce + 99abfd5 commit 6a4e781
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CSnakes.Runtime/Locators/NuGetLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public override PythonLocationMetadata LocatePython()
{
throw new DirectoryNotFoundException("Neither NUGET_PACKAGES or USERPROFILE environments variable were found, which are needed to locate the NuGet package cache.");
}
string? globalNugetPackagesPath = string.IsNullOrEmpty(nugetPackagesOverride) ? userProfile : nugetPackagesOverride;
string? globalNugetPackagesPath = string.IsNullOrEmpty(nugetPackagesOverride) ? Path.Combine(userProfile, ".nuget", "packages") : nugetPackagesOverride;

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / publish-github-packages

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / publish-github-packages

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.9, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.9, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.10, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.10, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.11, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.11, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.12, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.12, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.13.0-rc.1, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.13.0-rc.1, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.9, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.9, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.10, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.10, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.11, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.11, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.12, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.12, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.13.0-rc.1, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.13.0-rc.1, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.9, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.9, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.10, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.10, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.11, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.11, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.12, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.12, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.13.0-rc.1, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.13.0-rc.1, 8.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.12, 6.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.12, 6.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.12, 7.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.12, 7.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.12, 9.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.

Check warning on line 14 in src/CSnakes.Runtime/Locators/NuGetLocator.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.12, 9.0.x)

Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2, string path3)'.
// TODO : Load optional path from nuget settings. https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders
string nugetPath = Path.Combine(globalNugetPackagesPath!, ".nuget", "packages", "python", $"{Version.Major}.{Version.Minor}.{Version.Build}", "tools");
string nugetPath = Path.Combine(globalNugetPackagesPath!, "python", $"{Version.Major}.{Version.Minor}.{Version.Build}", "tools");
return LocatePythonInternal(nugetPath);
}

Expand Down

0 comments on commit 6a4e781

Please sign in to comment.