mirror of
https://github.com/unraid/webgui.git
synced 2026-01-05 17:20:04 -06:00
fix: diagnostics: ensure commands run with UTF-8 charset
This commit is contained in:
@@ -69,7 +69,7 @@ function run($cmd, &$save=null, $timeout=30) {
|
||||
// output command for display
|
||||
write($cmd);
|
||||
// execute command with timeout of 30s
|
||||
exec("timeout -s9 $timeout $cmd 2>&1", $save, $return_code);
|
||||
exec("LC_ALL=en_US.UTF-8 timeout -s9 $timeout $cmd 2>&1", $save, $return_code);
|
||||
if ($return_code !== 0) {
|
||||
log_error("Command failed with return code $return_code", $cmd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user