Ensure tool package store root is a full path.

This commit fixes the tool package store such that it stores a full path
instead of, potentially, a relative path.

This prevents a relative path from inadvertently being passed to NuGet
during the restore and causing it to restore relative to the temp project
directory.

Fixes #8829.
This commit is contained in:
Peter Huene 2018-03-16 19:47:34 -07:00
commit 4f8ac7dce5
No known key found for this signature in database
GPG key ID: E1D265D820213D6A
4 changed files with 9 additions and 5 deletions

View file

@ -14,7 +14,7 @@ namespace Microsoft.DotNet.ToolPackage
public ToolPackageStore(DirectoryPath root)
{
Root = root;
Root = new DirectoryPath(Path.GetFullPath(root.Value));
}
public DirectoryPath Root { get; private set; }