Merge pull request #863 from Sridhar-MS/beta-fixes
Fix driver to remove double quotes from paths in %PATH% env
This commit is contained in:
commit
527e20acc6
1 changed files with 7 additions and 2 deletions
|
@ -19,7 +19,9 @@ namespace Microsoft.DotNet.Cli.Utils
|
|||
{
|
||||
|
||||
_executableExtensions = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||
? Environment.GetEnvironmentVariable("PATHEXT").Split(';').Select(e => e.ToLower())
|
||||
? Environment.GetEnvironmentVariable("PATHEXT")
|
||||
.Split(';')
|
||||
.Select(e => e.ToLower().Trim('"'))
|
||||
: new [] { string.Empty };
|
||||
}
|
||||
|
||||
|
@ -35,7 +37,10 @@ namespace Microsoft.DotNet.Cli.Utils
|
|||
{
|
||||
var searchPaths = new List<string> {AppContext.BaseDirectory};
|
||||
|
||||
searchPaths.AddRange(Environment.GetEnvironmentVariable("PATH").Split(Path.PathSeparator));
|
||||
searchPaths.AddRange(Environment
|
||||
.GetEnvironmentVariable("PATH")
|
||||
.Split(Path.PathSeparator)
|
||||
.Select(p => p.Trim('"')));
|
||||
|
||||
_searchPaths = searchPaths;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue