From 48c1a5515392cc05be0cf7209a6fce69c63df3b7 Mon Sep 17 00:00:00 2001 From: Darragh Bailey Date: Wed, 6 Jan 2021 10:48:22 +0000 Subject: [PATCH] Use correct shell variable for options pass-thru (#1197) Switch using "$@" to ensure that options provided on the command line to be interpreted by vagrant are correctly passed on with appropriate quoting. This fixes the issue where running the docker container with `vagrant ssh -c 'ls -la'` would fail as the `-la` option was interpreted by vagrant instead of being passed as part of the value for the `-c` option. --- README.md | 9 --------- entrypoint.sh | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/README.md b/README.md index ea8ff6a..222c465 100644 --- a/README.md +++ b/README.md @@ -145,15 +145,6 @@ alias vagrant=' vagrant' ``` -Known issue of Docker based Installation: SSH command option cannot be used, so below command: -```bash -vagrant ssh master -c 'ls -la' -``` -should be call below way: -```bash -vagrant ssh master -- 'ls -la' -``` - Note that if you are connecting to a remote system libvirt, you may omit the `-v /var/run/libvirt/:/var/run/libvirt/` mount bind. Some distributions patch the local vagrant environment to ensure vagrant-libvirt uses `qemu:///session`, which means you diff --git a/entrypoint.sh b/entrypoint.sh index 2baf513..a0d818a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -105,4 +105,4 @@ then exec gosu ${USER} vagrant help fi -exec gosu ${USER} $* +exec gosu ${USER} "$@"