Skip to content

Conversation

@cedricbuild
Copy link

@cedricbuild cedricbuild commented Aug 29, 2024

Description

fix(job): command exited with non zero reports to user

Fixes issue #

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • x] User-visible changes noted in CHANGELOG.rst

@cedricbuild cedricbuild changed the title Master fix(job): command exited with non zero reports to user Aug 29, 2024
Copy link
Member

@ridiculousfish ridiculousfish left a 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.
Copy link
Member

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.

Copy link
Member

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)'")
Copy link
Member

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/")
Copy link
Member

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)
Copy link
Member

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.
Copy link
Member

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

@faho
Copy link
Member

faho commented Dec 29, 2024

Closing this for lack of response.

@faho faho closed this Dec 29, 2024
@zanchey zanchey added this to the will-not-implement milestone Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants