Reputation: 995
So I try to run a bash script in my pipeline on Azure Devops. Here is my code for it:
- task: Bash@3
inputs:
filePath: '../marvel-lcg-companion/hooks/az-emulator'
But as you can see I received this error when I run the pipeline.
##[error]ENOENT: no such file or directory, stat '/Users/runner/work/1/marvel-lcg-companion/hooks/az-emulator'
So for me it is not clear how to format the file path in my YAML file. Can you guys point me in the right direction? I also tried the glob version without any success
**/hooks/az-emulator
UPDATE: my root folder is marvel-lcg-companion
Upvotes: 2
Views: 6395
Reputation: 40553
First of please ensure what you have in your working directory by adding this:
- script: ls '$(System.DefaultWorkingDirectory)'
but if marvel-lcg-companion
is folder in root of your repo (and you use sinfle repo) you should try:
- task: Bash@3
inputs:
filePath: '$(System.DefaultWorkingDirectory)/marvel-lcg-companion/hooks/az-emulator'
However if marvel-lcg-companion
is name of your repo than rather this:
- task: Bash@3
inputs:
filePath: '$(System.DefaultWorkingDirectory)/hooks/az-emulator'
Upvotes: 4