Skip to content
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

ENH: give "typical" shell behavior when command is not found to be executed #138

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

yarikoptic
Copy link
Member

both bash and zsh exit then with 127 and message like "command_name: command not found", so duct now will be have the same instead of throwing the exception traceback into the user.

Also, there is no reason to announce to the user that we are saving some log files in such a case. But since we might have created them by our attempt to execute, we will just remove them before exiting with an error. This way we would not leave junk around

…ecuted

both bash and zsh exit then with 127 and message like "command_name: command not found",
so duct now will be have the same instead of throwing the exception traceback
into the user.

Also, there is no reason to announce to the user that we are saving some log files in such
a case. But since we might have created them by our attempt to execute, we will just remove
them before exiting with an error.  This way we would not leave junk around
@yarikoptic yarikoptic requested review from jwodder and asmacdo August 14, 2024 20:52
Copy link

codecov bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.26%. Comparing base (fc355ea) to head (7144784).
Report is 9 commits behind head on main.

Files Patch % Lines
src/con_duct/__main__.py 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #138      +/-   ##
==========================================
+ Coverage   94.33%   95.26%   +0.92%     
==========================================
  Files           2        2              
  Lines         353      401      +48     
  Branches       57       63       +6     
==========================================
+ Hits          333      382      +49     
+ Misses         14       12       -2     
- Partials        6        7       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asmacdo asmacdo added the semver-minor Increment the minor version when merged label Aug 15, 2024
@yarikoptic yarikoptic merged commit ea784ba into main Aug 15, 2024
29 of 30 checks passed
@asmacdo asmacdo deleted the enh-noemptylog branch August 16, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor Increment the minor version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants