Windows commands that run over SSH are wrapped in a script that writes a
special marker to the two output streams (stdout and stderr). This
allows Vagrant to consume the output streams.
Unfortunately, this leads to a sort of chicken-and-egg problem where no
commands can be run before a wrapper script exists. For example, you
can't make a destination directory to upload the wrapper script without
first creating a wrapper script to make the directory. :)
This commit changes the behavior of the WinSSH communicator to assume
that the destination directory already exists for provisioning scripts.
It also moves the default `upload_path` from the shell provisioner
config so we can have OS-specific defaults.
Finally, it introduces a Windows-specific #upload method which will
properly use a Windows path separator on a non-Windows host.
This commit changes the behavior of the builtin SSHRun action to use a Windows
shell if the WinSSH communicator is active. This allows for running one-off SSH
commands with Windows Command Prompt or PowerShell. By default, this will not
allocate a TTY for any SSH commands.
Example usage:
```
vagrant ssh -c 'dir "c:\program files"'
```
Updates docs to reflect a change made in
a55a53e6a4.
This commit catches the Errno::EPERM raised by the operating system if
the machine folder is inaccessible and displays it as a more friendly
error message.
This can be an issue on macOS Catalina if virtual machine files are kept
in a special directory (Documents/Downloads/Desktop) that Vagrant's
embedded Ruby is not allowed to access.
Having these provisioners not alphabitized on the website and
Vagrantfile, seemed odd. This reorders them to be consistent.
Signed-off-by: JJ Asghar <jjasghar@gmail.com>
Signed-off-by: JJ Asghar <awesome@ibm.com>
Prior to this commit, if a user had recently checked for updates, there
was no way to force Vagrant to re-check without manually deleting a
state file in the local `.vagrant` data dir. This commit fixes that by
giving users the ability to force check for updates for a given box with
a flag to the `vagrant box outdated` command.
This commit changes the behavior of `vagrant box outdated --global` so
it gets the latest version for the current machine's provider, rather
than the latest version for any provider.