File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/chocolatey/infrastructure.app/nuget Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1818using System . Collections . Concurrent ;
1919using System . Collections . Generic ;
2020using System . ComponentModel ;
21+ using System . IO ;
2122using System . Linq ;
2223using System . Net ;
2324using System . Security . Cryptography . X509Certificates ;
@@ -253,6 +254,13 @@ public static IEnumerable<SourceRepository> GetRemoteRepositories(ChocolateyConf
253254 // If an invalid source was passed in, we don't care here, pass it along
254255 fullsource = source ;
255256 }
257+
258+ // filesystem.GetFullPath sometimes resolves to `C:` instead of `C:\` which PackageSource can't handle. This corrects for that edge case.
259+ if ( fullsource . EndsWith ( ":" ) )
260+ {
261+ fullsource += Path . DirectorySeparatorChar ;
262+ }
263+
256264 nugetSource = new PackageSource ( fullsource ) ;
257265
258266 if ( ! nugetSource . IsLocal )
You can’t perform that action at this time.
0 commit comments