-
Notifications
You must be signed in to change notification settings - Fork 0
fix: console visibility, NSIS registry view, and Northstar LSX (#3) #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -268,7 +268,25 @@ async fn run(args: &[String]) -> Result<bool, RunError> { | |
| } | ||
|
|
||
| child.args(["launch", offer_id]); | ||
| child.spawn()?.wait().await?; | ||
| let status = child.spawn()?.wait().await?; | ||
|
|
||
| // Bootstrap historically ignored maxima-cli's exit code: if the | ||
| // child crashed or aborted, bootstrap still returned Ok(true) and | ||
| // the log read "Result: Success", making the failure invisible. | ||
| // Surface non-zero exits so maxima_execution.log shows when the | ||
| // launch actually failed. | ||
| if !status.success() { | ||
| let temp_dir = std::env::temp_dir(); | ||
| let debug_log = temp_dir.join("maxima_execution.log"); | ||
| if let Ok(mut file) = std::fs::OpenOptions::new().create(true).append(true).open(&debug_log) { | ||
| use std::io::Write; | ||
| let _ = writeln!( | ||
| file, | ||
| "maxima-cli (link2ea) exited non-zero: code={:?}", | ||
| status.code() | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| return Ok(true); | ||
| } | ||
|
|
@@ -313,7 +331,20 @@ async fn run(args: &[String]) -> Result<bool, RunError> { | |
| } | ||
|
|
||
| child.args(["launch", offer_id]); | ||
| child.spawn()?.wait().await?; | ||
| let status = child.spawn()?.wait().await?; | ||
|
|
||
| if !status.success() { | ||
| let temp_dir = std::env::temp_dir(); | ||
| let debug_log = temp_dir.join("maxima_execution.log"); | ||
| if let Ok(mut file) = std::fs::OpenOptions::new().create(true).append(true).open(&debug_log) { | ||
| use std::io::Write; | ||
| let _ = writeln!( | ||
| file, | ||
| "maxima-cli (origin2) exited non-zero: code={:?}", | ||
| status.code() | ||
| ); | ||
| } | ||
| } | ||
|
Comment on lines
+331
to
+337
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the if !status.success() {
return Err(std::io::Error::new(
std::io::ErrorKind::Other,
format!("maxima-cli (origin2) exited non-zero: code={:?}", status.code())
).into());
}References
|
||
|
|
||
| return Ok(true); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The manual logging of the non-zero exit code to
maxima_execution.logis redundant because thehandle_launch_argsfunction already logs the result. By returning an error here, you can leverage the existing infrastructure. Additionally, ensure that ifStdio::piped()is used, thestderroutput is captured and included in the error message to provide better diagnostic information.References