-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Error in complete exit_code field instead of numerical exit code #12369
Copy link
Copy link
Closed
Labels
A:error-handlingHow errors in externals/nu code are caught or handled programmatically (see also unhelpful-error)How errors in externals/nu code are caught or handled programmatically (see also unhelpful-error)A:signal-cancelProblems with how executions react to signals or attempts at cancellation (CTRL-C)Problems with how executions react to signals or attempts at cancellation (CTRL-C)category:bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
When running with an external command which exits with, eg., a SIGABRT, complete contains an internal error:
$ ./a.out | complete
SIGABRT: child process './a.out' core dumped
╭───────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ stdout │ │
│ stderr │ │
│ exit_code │ ExternalCommand { label: "core dumped", help: "SIGABRT: child process './a.out' core dumped", span: Span { start: │
│ │ 141774, end: 141781 } } │
╰───────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
How to reproduce
- Run a program which throws a SIGABRT (may happen for other errors as well?)
#include <signal.h>
int main() {
raise(SIGABRT);
}- Run the executable and pipeline into complete, eg.
./a.out | complete
Expected behavior
To provide a numerical exit code
Screenshots
No response
Configuration
| key | value |
|---|---|
| version | 0.92.0 |
| branch | makepkg |
| commit_hash | c3428b8 |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.75.0 (82e1608df 2023-12-21) |
| rust_channel | stable-x86_64-unknown-linux-gnu |
| cargo_version | cargo 1.75.0 (1d8b05cdd 2023-11-20) |
| build_time | 2024-04-02 18:50:27 +00:00 |
| build_rust_channel | release |
| allocator | mimalloc |
| features | dataframe, default, sqlite, trash, which |
| installed_plugins | clipboard |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:error-handlingHow errors in externals/nu code are caught or handled programmatically (see also unhelpful-error)How errors in externals/nu code are caught or handled programmatically (see also unhelpful-error)A:signal-cancelProblems with how executions react to signals or attempts at cancellation (CTRL-C)Problems with how executions react to signals or attempts at cancellation (CTRL-C)category:bugSomething isn't workingSomething isn't working