-
Notifications
You must be signed in to change notification settings - Fork 228
Add improved logging around command failures #2351
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 all commits
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 |
|---|---|---|
|
|
@@ -987,7 +987,9 @@ impl RunningActionImpl { | |
| // level more effectively and adjust this. | ||
| info!(?args, "Executing command"); | ||
|
|
||
| let program = self.canonicalise_path(args[0], &command_proto.working_directory)?; | ||
| let program = self | ||
| .canonicalise_path(args[0], &command_proto.working_directory) | ||
| .err_tip(|| format!("Canonicalisation failure. Command={args:#?}"))?; | ||
|
|
||
| let mut command_builder = process::Command::new(program); | ||
| #[cfg(target_family = "unix")] | ||
|
|
@@ -1534,6 +1536,7 @@ impl RunningActionImpl { | |
| exit_code = ?execution_result.exit_code, | ||
| stdout = ?stdout[..min(stdout.len(), 1000)], | ||
| stderr = ?stderr[..min(stderr.len(), 1000)], | ||
| command = ?command_proto.arguments, | ||
|
Member
Author
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. The error was just |
||
| "Command returned non-zero exit code", | ||
| ); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,7 +41,7 @@ and get tagged with nix derivation hashes. | |
| To build an image locally and make it available to your container runtime: | ||
|
|
||
| ```sh | ||
| nix run create-local-image | ||
| create-local-image | ||
|
Member
Author
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. Previous command just got you |
||
| ``` | ||
|
|
||
| which will be called `local-nativelink:latest` | ||
|
|
||
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.
Error executing action, err: Error { code: NotFound, messages: ["No such file or directory (os error 2)", "Could not canonicalize path for command root /bin/bash."] }isn't very useful without knowing what was trying to invoke bash