15 Commits

Author SHA1 Message Date
Paul Hinze
63cefbb8ed
Fix ssh-config and winrm-config by remote-ifying safe_puts
This also removes the "Running (command)..." output since users will
expect to be able to redirect the ssh-config output to a file without
that noise.

If we really like the "Running" thing we can try and swing around and
get fancy by detecting whether or not we have a terminal or a file as
output and doing conditional stuff, but this seemed like the simplest
way forward for now.
2022-06-24 12:53:57 -05:00
Paul Hinze
73a1be95fe
Fix nil dereference bug in new error handling logic
Found this while running `./vagrant box` with no args to get the help
output. It turns out you can have an empty RunResult but also a nil
error. I took the occasion to unwind the conditional tree a bit which
hopefully makes it a bit easier to read.
2022-04-25 12:26:49 -05:00
Paul Hinze
1341bfe0af
Tweak Ruby->Go error handling so exit codes match
In legacy Vagrant, any exception raised that's a subclass of
Vagrant::Errors::VagrantError is considered user-facing and so causes
the error message to be printed to the console and the process to use
exit code 1. Anything outside of that causes the process to use exit
code 255. (See `bin/vagrant` for the code.)

Here we mirror that behavior by treating errors that have a
LocalizedMessage as user-facing and those without as unexpected. This
allows the basic virtualbox component to pass in vagrant-spec!
2022-04-25 12:26:49 -05:00
Chris Roberts
46a9440b57
Set remaining args into proto 2022-04-25 12:26:26 -05:00
Chris Roberts
c010ae0429
Update CLI to use internal flags implementation 2022-04-25 12:26:25 -05:00
Chris Roberts
d8145cdd52
Update flag value extraction for dynamic commands 2022-04-25 12:26:22 -05:00
sophia
deb667ecd3
Use common rpc errdetails messages 2022-04-25 12:26:20 -05:00
sophia
219473fb60
Seach for localized error message in error details 2022-04-25 12:26:20 -05:00
sophia
c4e97bb89b
Send localized message originating from plugin (if applicable) 2022-04-25 12:26:20 -05:00
Chris Roberts
96ac78a9a4
Fix some panics 2022-04-25 12:24:31 -05:00
Chris Roberts
6bc65c10c8
Update dynamic to use client directly and automatically set scope 2022-04-25 12:24:25 -05:00
Chris Roberts
29c3cf439b
Support passing exit code back to origin 2022-04-25 12:24:11 -05:00
Chris Roberts
c547fba079
Remove machine from cli and reference only targets 2022-04-25 12:24:06 -05:00
sophia
3107da72af
Execute subcommands 2022-04-25 12:24:02 -05:00
sophia
c3ee750db1
Add gogo 2022-04-25 12:23:57 -05:00