Merge pull request #4272 from brthor/brthor/tools-fix
Fix tools with trailing backslashes in additionalProbingPath
This commit is contained in:
commit
30e5ab7112
2 changed files with 7 additions and 2 deletions
|
@ -4,6 +4,7 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using Microsoft.DotNet.InternalAbstractions;
|
||||
using Microsoft.DotNet.ProjectModel;
|
||||
using Microsoft.DotNet.Tools.Common;
|
||||
using NuGet.Frameworks;
|
||||
using NuGet.ProjectModel;
|
||||
|
||||
|
@ -94,13 +95,14 @@ namespace Microsoft.DotNet.Cli.Utils
|
|||
}
|
||||
|
||||
var toolLibrary = GetToolLibraryForContext(projectContext, commandName);
|
||||
var normalizedNugetPackagesRoot = PathUtility.EnsureNoTrailingDirectorySeparator(projectContext.PackagesDirectory);
|
||||
|
||||
return _packagedCommandSpecFactory.CreateCommandSpecFromLibrary(
|
||||
toolLibrary,
|
||||
commandName,
|
||||
commandArguments,
|
||||
allowedExtensions,
|
||||
projectContext.PackagesDirectory,
|
||||
normalizedNugetPackagesRoot,
|
||||
s_commandResolutionStrategy,
|
||||
depsFilePath,
|
||||
runtimeConfigPath);
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using Microsoft.DotNet.InternalAbstractions;
|
||||
using Microsoft.DotNet.ProjectModel;
|
||||
using Microsoft.DotNet.Tools.Common;
|
||||
using Microsoft.Extensions.DependencyModel;
|
||||
using NuGet.Frameworks;
|
||||
using NuGet.LibraryModel;
|
||||
|
@ -111,12 +112,14 @@ namespace Microsoft.DotNet.Cli.Utils
|
|||
var depsFileRoot = Path.GetDirectoryName(lockFile.Path);
|
||||
var depsFilePath = GetToolDepsFilePath(toolLibraryRange, lockFile, depsFileRoot);
|
||||
|
||||
var normalizedNugetPackagesRoot = PathUtility.EnsureNoTrailingDirectorySeparator(nugetPackagesRoot);
|
||||
|
||||
return _packagedCommandSpecFactory.CreateCommandSpecFromLibrary(
|
||||
toolLibrary,
|
||||
commandName,
|
||||
args,
|
||||
_allowedCommandExtensions,
|
||||
projectContext.PackagesDirectory,
|
||||
normalizedNugetPackagesRoot,
|
||||
s_commandResolutionStrategy,
|
||||
depsFilePath,
|
||||
null);
|
||||
|
|
Loading…
Add table
Reference in a new issue