DEV Community

prince raj
prince raj

Posted on

cp: cannot stat 'bhfonlineshop': No such file or directory. Azure devops pipeline error

I am running a azure devops pipeline and facing the error below.
I am running a azure devops pipeline and facing the error below.
/usr/bin/bash --noprofile --norc /home/***/myagent/_work/_temp/d6b34bdf-89e5-43e9-862a-c0c33f02f84f.sh
cp: cannot stat 'onlineshop': No such file or directory

[error]Bash exited with code '1'.

This is the code snippet of the pipeline

stages:

  • stage: Checkout displayName: 'Checkout Stage' jobs:
    • job: CheckoutJob displayName: 'Checkout Job' steps:
      • checkout: self
      • checkout: shop clean: true path: shop
      • script: | cd $(System.DefaultWorkingDirectory) && sudo cp -r onlineshop $(buildFolder)/builds

My source code i.e. onlineshop is not coming under _work/5/s when $(System.DefaultWorkingDirectory) is running. source code onlineshop is coming under _work/5/onlineshop. because of this I am getting error.

Please help if anyone can help to resolve the issue.

Thanks in advance.

Top comments (0)