Closed vincentvanderwalt closed 5 years ago
Hey Vinny,
We use default dotnet tool behaviour, we do not define how dotnet should interpret the commands. I think you should ask the dotnet cli developers how this works.
Injecting dotnet- is how dotnet tools work.
See microsoft explaination for how to run tools you installed in your own location.
Microsoft seems to required that your custom tool path is still available in the system path and the tool should still be run like dotnet-stryker and dotnet ~/artifacts/stryker will not work. See:
https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install
I managed to get the resolution from the dotnet cli team and they raised an additional task for the ~/ folder approach.
#11603 for anyone experiencing the same issue
Describe the bug During my Azure Devops CI pipeline I need to install Stryker to run it against my project.
When I do
dotnet tool install -g dotnet-stryker
Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.
The recommended approach is to install the tool with --tool-path option.
dotnet tool install dotnet-stryker --toolpath ~/artifacts
However when I try and do that for Stryker it inject dotnet- in front of the command which then fails for example
dotnet ~/artifacts/stryker
gets turned into
No executable found matching command "dotnet-/home/artifacts/stryker"
instead of /home/artifacts/dotnet-stryker
Expected behavior When using the --toolpath option the dotnet- should not be prepended to the whole string but to the word stryker
Desktop (please complete the following information):