Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool installation with relative --tool-path option fails to install. #9192

Closed
peterhuene opened this issue Mar 17, 2018 · 1 comment · Fixed by dotnet/cli#8830
Closed

Tool installation with relative --tool-path option fails to install. #9192

peterhuene opened this issue Mar 17, 2018 · 1 comment · Fixed by dotnet/cli#8830
Assignees
Labels
Milestone

Comments

@peterhuene
Copy link
Contributor

Steps to reproduce

  1. dotnet install tool --tool-path foo dotnetsay

Expected behavior

Expected the tool to install into $(pwd)/foo.

Actual behavior

The installation fails:

$ dotnet install tool --tool-path foo dotnetsay
Failed to install tool package 'dotnetsay': Could not find a part of the path '/Users/peterhuene/src/cli/test/dotnet.Tests/foo/.store/.stage/5xnuzw3m.n3c/dotnetsay'.
Tool 'dotnetsay' failed to install.

Environment data

$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.300-preview2-008366
 Commit:    680e72993b

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.13-x64
 Base Path:   /Users/peterhuene/src/cli/bin/2/osx-x64/dotnet/sdk/2.1.300-preview2-008366/

Host (useful for support):
  Version: 2.1.0-preview2-26313-01
  Commit:  3c802455b2

.NET Core SDKs installed:
  2.1.300-preview2-008366 [/Users/peterhuene/src/cli/bin/2/osx-x64/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0-preview2-30338 [/Users/peterhuene/src/cli/bin/2/osx-x64/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0-preview2-30338 [/Users/peterhuene/src/cli/bin/2/osx-x64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.0-preview2-26313-01 [/Users/peterhuene/src/cli/bin/2/osx-x64/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Bug

The tool package store is storing a relative path instead of a full path, causing a relative path to be passed to NuGet via the temp project. Thus NuGet restores relative to the temp project directory and not the current working directory.

@peterhuene peterhuene self-assigned this Mar 17, 2018
@peterhuene
Copy link
Contributor Author

I have a fix for this already.

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the 2.1.3xx milestone Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants