-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
Describe the bug
When mounting docker to $(pwd) with exec, the action failed and I got:
/usr/bin/docker: Error response from daemon: create $(pwd): "$(pwd)" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
Command called:
const cmd= "docker run -v $(pwd):/tmp tiagogouvea/dpl:v1.10.15 --provider='heroku' ";
await exec.exec(cmd);
ℹ️ Running the same command using child_process.execSync works. Example:
const cmd= "docker run -v $(pwd):/tmp tiagogouvea/dpl:v1.10.15 --provider='heroku' ";
execSync(cmd);
To Reproduce
Steps to reproduce the behavior:
- Create a action with JavaScript
- Call
await exec.exec("docker run -v $(pwd):/tmp tiagogouvea/dpl:v1.10.15");
Expected behavior
- Want to mount the current path to as docker volume.
- Wanted to
@actions/execwork likechild_process/execSync.
Desktop (please complete the following information):
- OS:
runs-on: ubuntu-latest
billyvg, cemtopkaya and mogikanen9