2

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

2
  • So what is the full path to the file? Commented Dec 3, 2020 at 21:07
  • Just the one with marvel in it (that is the root folder of the git) Commented Dec 3, 2020 at 21:16

1 Answer 1

4

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'
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.