-
Notifications
You must be signed in to change notification settings - Fork 53
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
Fix traceback when git is not installed #2818
Conversation
|
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.
- Code checks out
- Manually tested
sudo mv /usr/bin/git .
🤮
Do you think it needs a 2nd reviewer? |
Borderline, but I think it does on balance. |
@@ -268,7 +268,7 @@ def run_bg(self, *args, **kwargs): | |||
except OSError as exc: | |||
if exc.filename is None and args: | |||
exc.filename = args[0] | |||
raise RosePopenError(args, 1, "", str(exc)) | |||
raise RosePopenError(args, exc.errno, "", str(exc)) from None |
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.
Python's errnos are between 1 and 132, so this should be fine.
(poked tests) |
Hmm, the Python 3.7 tests seem to be consistently hanging 😢 But not for me locally with a fresh Python 3.7 environment |
It looks like that is also happening on master. https://github.com/metomi/rose/actions/runs/11587156748 |
Closes #2809 - fixes
rose app-run
androse task-run
crashing if git is not installed