DotNetCoreCLI's arguments does not expand ~ to home directory
See original GitHub issuerelate 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:
- If using Hosted agent, provide agent queue name: ‘ubuntu-latest’
- If using private agent, provide the OS of the machine running the agent and the agent version:
Issue Description
~ will not expend as the following
steps:
- task: DotNetCoreCLI@2
displayName: 'Install Stryker'
continueOnError: true
inputs:
command: custom
custom: tool
arguments: 'install dotnet-stryker --tool-path ~/tools'
- script: |
ls ~/tools # will fail as no such folder since ~ is not expand. More see log
displayName: 'ls
it works in local ubuntu. I think arguments: 'install dotnet-stryker --tool-path ~/tools'
does not expand as normal shell
Task 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
.......
.......
2019-06-21T21:26:18.0962155Z HEAD is now at 4cceeab Update azure-pipelines.yml for Azure Pipelines
2019-06-21T21:26:18.1036840Z ##[section]Finishing: Checkout
2019-06-21T21:26:18.1054257Z ##[section]Starting: Install Stryker
2019-06-21T21:26:18.1059072Z ==============================================================================
2019-06-21T21:26:18.1059279Z Task : .NET Core
2019-06-21T21:26:18.1059313Z Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command
2019-06-21T21:26:18.1059347Z Version : 2.153.0
2019-06-21T21:26:18.1059387Z Author : Microsoft Corporation
2019-06-21T21:26:18.1059421Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
2019-06-21T21:26:18.1059454Z ==============================================================================
2019-06-21T21:26:20.7703719Z [command]/usr/bin/dotnet tool install dotnet-stryker --tool-path ~/tools
2019-06-21T21:26:31.1144402Z You can invoke the tool using the following command: dotnet-stryker
2019-06-21T21:26:31.1186259Z Tool 'dotnet-stryker' (version '0.11.0') was successfully installed.
2019-06-21T21:26:31.1412390Z ##[section]Finishing: Install Stryker
2019-06-21T21:26:31.1418256Z ##[section]Starting: ls
2019-06-21T21:26:31.1420444Z ==============================================================================
2019-06-21T21:26:31.1420557Z Task : Command line
2019-06-21T21:26:31.1420590Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2019-06-21T21:26:31.1420622Z Version : 2.151.1
2019-06-21T21:26:31.1420695Z Author : Microsoft Corporation
2019-06-21T21:26:31.1421144Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2019-06-21T21:26:31.1421182Z ==============================================================================
2019-06-21T21:26:31.2718700Z Generating script.
2019-06-21T21:26:31.2767313Z Script contents:
2019-06-21T21:26:31.2767399Z ls ~/tools
2019-06-21T21:26:31.2767437Z ========================== Starting Command Output ===========================
2019-06-21T21:26:31.2774952Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/863553a7-abae-4e27-bc4e-a3a4c99b423a.sh
2019-06-21T21:26:31.2845787Z ls: cannot access '/home/vsts/tools': No such file or directory
2019-06-21T21:26:31.2976586Z ##[error]Bash exited with code '2'.
2019-06-21T21:26:31.3008899Z ##[section]Finishing: ls
2019-06-21T21:26:31.3022466Z ##[section]Starting: Checkout
2019-06-21T21:26:31.3024302Z ==============================================================================
2019-06-21T21:26:31.3024345Z Task : Get sources
2019-06-21T21:26:31.3044198Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2019-06-21T21:26:31.3044264Z Version : 1.0.0
2019-06-21T21:26:31.3044301Z Author : Microsoft
2019-06-21T21:26:31.3044387Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2019-06-21T21:26:31.3044423Z ==============================================================================
2019-06-21T21:26:31.7324454Z Cleaning any cached credential from repository: msbuildsdksample (Git)
2019-06-21T21:26:31.7368201Z ##[section]Finishing: Checkout
2019-06-21T21:26:31.7436107Z ##[section]Starting: Finalize Job
2019-06-21T21:26:31.7478684Z Start cleaning up orphan processes.
2019-06-21T21:26:31.7560439Z ##[section]Finishing: Finalize Job
2019-06-21T21:26:31.7617495Z ##[section]Finishing: Job
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
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