mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 22:46:14 -05:00
fix: better error messages when spawning a child program fails
This commit is contained in:
1 parent
65a93041aa
commit
e4426df6a2
4 files changed
+26
-6
No files matched your search
@@ -72,10 +72,16 @@ impl<'a> HipLauncher<'a> {
|
||||
cmd.env("APP_VERSION", client_version);
|
||||
}
|
||||
|
||||
let output = cmd
|
||||
let child = cmd
|
||||
.kill_on_drop(true)
|
||||
.stdout(Stdio::piped())
|
||||
.spawn()?
|
||||
.spawn();
|
||||
|
||||
if child.is_err() {
|
||||
bail!("Failed to spawn {}: {}", self.program, child.unwrap_err())
|
||||
}
|
||||
|
||||
let output = child.unwrap()
|
||||
.wait_with_output()
|
||||
.await?;
|
||||
|
||||
|
||||
Reference in new issue
Block a user