Fix tools with trailing backslashes in additionalProbingPath

This commit is contained in:
Bryan Thornbury 2016-09-28 14:21:52 -07:00
parent da0e365264
commit 8c563a58f8
2 changed files with 5 additions and 2 deletions

View file

@ -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 nugetPackagesRoot = PathUtility.EnsureNoTrailingDirectorySeparator(projectContext.PackagesDirectory);
return _packagedCommandSpecFactory.CreateCommandSpecFromLibrary( return _packagedCommandSpecFactory.CreateCommandSpecFromLibrary(
toolLibrary, toolLibrary,
commandName, commandName,
commandArguments, commandArguments,
allowedExtensions, allowedExtensions,
projectContext.PackagesDirectory, nugetPackagesRoot,
s_commandResolutionStrategy, s_commandResolutionStrategy,
depsFilePath, depsFilePath,
runtimeConfigPath); runtimeConfigPath);

View file

@ -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;
@ -95,7 +96,7 @@ namespace Microsoft.DotNet.Cli.Utils
IEnumerable<string> args, IEnumerable<string> args,
ProjectContext projectContext) ProjectContext projectContext)
{ {
var nugetPackagesRoot = projectContext.PackagesDirectory; var nugetPackagesRoot = PathUtility.EnsureNoTrailingDirectorySeparator(projectContext.PackagesDirectory);
var lockFile = GetToolLockFile(toolLibraryRange, nugetPackagesRoot); var lockFile = GetToolLockFile(toolLibraryRange, nugetPackagesRoot);