-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix(job): command exited with non zero reports to user #10691
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
Conversation
…not signify this error to user
ridiculousfish
left a comment
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.
Thanks for this PR! Some things to fix.
| true | ||
| } | ||
|
|
||
| /// Return whether to emit a fish_job_summary call for a process. |
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.
I don't think we need this and proc_wants_summary above it? I'm not sure what the difference is.
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.
I don't think we need this helper file, please remove it.
| sendline("") | ||
| expect_prompt() | ||
|
|
||
| sendline("python -c 'import time;import sys;time.sleep(1);sys.exit(1)'") |
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.
I think this would be cleaner going through shell rather than python:
sendline("sh -c 'sleep 1; exit 1'")| @@ -1,4 +1,6 @@ | |||
| #!/usr/bin/env python3 | |||
| import sys | |||
| sys.path.append("/home/cedric/projects/fish-shell/build_tools/") | |||
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.
Please remove these
| set -l message | ||
| switch $signal_or_end_name | ||
| case STATUS | ||
| set message (printf ( _ "fish: Job %s, '%s' has Non Zero status code:%s\n" ) $job_id $cmd_line $signal_desc) |
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.
As $signal_desc may now be either the exit code or the status value, please update the "docstring" at the top of the function, and rename the variable.
As for the message, I suggest just extending the ENDED message:
set message (printf ( _ "fish: Job %s, '%s' has ended with status %d\n" ) $job_id $cmd_line $status_num)
| }; | ||
| } | ||
| Some(p) => { | ||
| // We are summarizing a process which exited with a signal. |
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.
This comment is no longer accurate, please update it
|
Closing this for lack of response. |
Description
fix(job): command exited with non zero reports to user
Fixes issue #
TODOs: