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 System.Linq;
|
||||||
using Microsoft.DotNet.InternalAbstractions;
|
using Microsoft.DotNet.InternalAbstractions;
|
||||||
using Microsoft.DotNet.ProjectModel;
|
using Microsoft.DotNet.ProjectModel;
|
||||||
|
using Microsoft.DotNet.Tools.Common;
|
||||||
using NuGet.Frameworks;
|
using NuGet.Frameworks;
|
||||||
using NuGet.ProjectModel;
|
using NuGet.ProjectModel;
|
||||||
|
|
||||||
|
@ -94,13 +95,14 @@ namespace Microsoft.DotNet.Cli.Utils
|
||||||
}
|
}
|
||||||
|
|
||||||
var toolLibrary = GetToolLibraryForContext(projectContext, commandName);
|
var toolLibrary = GetToolLibraryForContext(projectContext, commandName);
|
||||||
|
var normalizedNugetPackagesRoot = PathUtility.EnsureNoTrailingDirectorySeparator(projectContext.PackagesDirectory);
|
||||||
|
|
||||||
return _packagedCommandSpecFactory.CreateCommandSpecFromLibrary(
|
return _packagedCommandSpecFactory.CreateCommandSpecFromLibrary(
|
||||||
toolLibrary,
|
toolLibrary,
|
||||||
commandName,
|
commandName,
|
||||||
commandArguments,
|
commandArguments,
|
||||||
allowedExtensions,
|
allowedExtensions,
|
||||||
projectContext.PackagesDirectory,
|
normalizedNugetPackagesRoot,
|
||||||
s_commandResolutionStrategy,
|
s_commandResolutionStrategy,
|
||||||
depsFilePath,
|
depsFilePath,
|
||||||
runtimeConfigPath);
|
runtimeConfigPath);
|
||||||
|
|
|
@ -4,6 +4,7 @@ using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.DotNet.InternalAbstractions;
|
using Microsoft.DotNet.InternalAbstractions;
|
||||||
using Microsoft.DotNet.ProjectModel;
|
using Microsoft.DotNet.ProjectModel;
|
||||||
|
using Microsoft.DotNet.Tools.Common;
|
||||||
using Microsoft.Extensions.DependencyModel;
|
using Microsoft.Extensions.DependencyModel;
|
||||||
using NuGet.Frameworks;
|
using NuGet.Frameworks;
|
||||||
using NuGet.LibraryModel;
|
using NuGet.LibraryModel;
|
||||||
|
@ -111,12 +112,14 @@ namespace Microsoft.DotNet.Cli.Utils
|
||||||
var depsFileRoot = Path.GetDirectoryName(lockFile.Path);
|
var depsFileRoot = Path.GetDirectoryName(lockFile.Path);
|
||||||
var depsFilePath = GetToolDepsFilePath(toolLibraryRange, lockFile, depsFileRoot);
|
var depsFilePath = GetToolDepsFilePath(toolLibraryRange, lockFile, depsFileRoot);
|
||||||
|
|
||||||
|
var normalizedNugetPackagesRoot = PathUtility.EnsureNoTrailingDirectorySeparator(nugetPackagesRoot);
|
||||||
|
|
||||||
return _packagedCommandSpecFactory.CreateCommandSpecFromLibrary(
|
return _packagedCommandSpecFactory.CreateCommandSpecFromLibrary(
|
||||||
toolLibrary,
|
toolLibrary,
|
||||||
commandName,
|
commandName,
|
||||||
args,
|
args,
|
||||||
_allowedCommandExtensions,
|
_allowedCommandExtensions,
|
||||||
projectContext.PackagesDirectory,
|
normalizedNugetPackagesRoot,
|
||||||
s_commandResolutionStrategy,
|
s_commandResolutionStrategy,
|
||||||
depsFilePath,
|
depsFilePath,
|
||||||
null);
|
null);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue