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.
This commit is contained in:
Darragh Bailey
2021-01-06 10:48:22 +00:00
committed by GitHub
parent 441bcc24bf
commit 48c1a55153
2 changed files with 1 additions and 10 deletions

View File

@@ -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

View File

@@ -105,4 +105,4 @@ then
exec gosu ${USER} vagrant help
fi
exec gosu ${USER} $*
exec gosu ${USER} "$@"