Merge pull request #4272 from brthor/brthor/tools-fix

Fix tools with trailing backslashes in additionalProbingPath
This commit is contained in:
Bryan Thornbury 2016-09-28 16:44:32 -07:00 committed by GitHub
commit 30e5ab7112
2 changed files with 7 additions and 2 deletions

View file

@ -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);

View file

@ -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);