environment: Log stderr too if command fails to run (#20659)

Release Notes:

- N/A
This commit is contained in:
Thorsten Ball 2024-11-14 14:44:32 +01:00 committed by GitHub
parent 35798212c4
commit 776cfe44d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -312,7 +312,12 @@ async fn load_shell_environment(
let stdout = String::from_utf8_lossy(&output.stdout);
let Some(env_output_start) = stdout.find(marker) else {
log::error!("failed to parse output of `env` command in login shell: {stdout}");
let stderr = String::from_utf8_lossy(&output.stderr);
log::error!(
"failed to parse output of `env` command in login shell. stdout: {:?}, stderr: {:?}",
stdout,
stderr
);
return message("Failed to parse stdout of env command. See logs for the output");
};