Closed wli3 closed 3 years ago
Thanks @wli3 for reporting the issue , I will have a look and get back to you asap.
@wli3 We are directly passing the arguments to dotnet tool, and it is instaling the tool into \<WorkingDirectory>/~/tools folder where \<WorkingDirectory> is input field in the task. I think dotnet is not able to expand ~ internally.
@wli3 One more thing, in the error logs you have pasted, it shows everything is working fine and also it mentions "./tools" instead of "~/tools". Can you double check your yaml script for this scenario.
Sorry. I pasted the wrong log. I updated it to the right log in ~
I think dotnet is not able to expand ~ internally.
(FYI I am on the dotnet team) if you run the same command on a normal ubuntu machine, it can work -- it is the bash shell that is expending it. However, the Task does not. I do understand the technical reason. However, this discrepancy between shell experience and the Task will trick the user to the error. Maybe you could always let it pass through bash first. Or expend it, and treat all the "argument" as a special shell. Or at least you could have some documentation for this behavior(or warning in UI). It is not easy to debug it when it happens.
Also $HOME will not expand as well
Hey @wli3 , We are exploring ways to handle this scenario as this is the first time one has asked about this scenario and this change may break other people's scenario. Anyhow the Cx is unblocked by using Agent.BuildDirectory.
This issue is stale because it has been open for a year with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days
relate to https://github.com/dotnet/cli/issues/11603 cc @vinnytheviking
Note
Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo
For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
If you have an issue or request for the Azure Pipelines service, use developer community instead:
https://developercommunity.visualstudio.com/spaces/21/index.html )
Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: DotNetCoreCLIV2 list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Environment
Server - Azure Pipelines or TFS on-premises?
If using TFS on-premises, provide the version:
If using Azure Pipelines, provide the account name, team project name, build definition name/build number: account williamleewul, project william%20test%20project, build number: 904
Agent - Hosted or Private:
Issue Description
~ will not expend as the following
it works in local ubuntu. I think
arguments: 'install dotnet-stryker --tool-path ~/tools'
does not expand as normal shellTask logs
[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]
Troubleshooting
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
Error logs