devcontainers / ci

A GitHub Action and Azure DevOps Task designed to simplify using Dev Containers (https://containers.dev) in CI/CD systems.
MIT License
334 stars 51 forks source link

Error retrieving current directory in the container #230

Open kzankpe opened 1 year ago

kzankpe commented 1 year ago

Hello,

I am using the Azure DevOps extension and I am getting the error below :

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Failed to determine current working directory: getwd: no such file or directory
{"outcome":"error","message":"Command failed: bash -c terraform init -backend-config=./backend.tfvars","description":"An error occurred running a command in the container."}

This error occurs when Running a command in the dev container. Here is my command

terraform init -backend-config=./backend.tfvars

Task configuration :

Is there something wrong here? Thank you.

stuartleeks commented 1 year ago

HI @kzankpe, the formatting of the task configuration has been lost in your message, so I can't tell whether there is anything off there.

From what I can see, there's nothing that jumps out as immediately wrong 🤔

Could you try setting the runCmd to echo $PWD and seeing whether that runs, and if so what the output is? There's an example here

kzankpe commented 1 year ago

Hello,

Sorry for the late response, I tried the cmd from your response but I am getting the same error.