Force LANG when executing commands

This forces the LANG enviroment variable to be set to `"C"` when
executing VBoxManage commands. Doing this prevents localization of
output which causes failures of the VirtualBox driver when scanning
for information.
This commit is contained in:
Chris Roberts 2022-11-11 10:32:32 -08:00
parent aa3be5b6ab
commit f7e5a9d199

View File

@ -460,7 +460,9 @@ module VagrantPlugins
end
# Append in the options for subprocess
command << { notify: [:stdout, :stderr] }
# NOTE: We include the LANG env var set to C to prevent command output
# from being localized
command << { notify: [:stdout, :stderr], env: {LANG: "C"}}
Vagrant::Util::Busy.busy(int_callback) do
Vagrant::Util::Subprocess.execute(@vboxmanage_path, *command, &block)