Skip to content

fix exit code in non-interactive mode#1011

Merged
marcospb19 merged 1 commit into
ouch-org:mainfrom
valoq:exit-code
Jun 21, 2026
Merged

fix exit code in non-interactive mode#1011
marcospb19 merged 1 commit into
ouch-org:mainfrom
valoq:exit-code

Conversation

@valoq

@valoq valoq commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

When ouch decompress hits a file or directory conflict and stdin is /dev/null e.g. when used in a script, it cannot prompt the user.
The default of FileConflitOperation is Cancel, which makes the entry silently skip and the whole run report success (exit 0) while extracting nothing.

This is also inconsistent with an empty-pipe (EOF) stdin, which already returns a FinalError and exits non-zero for the very same prompt.

This PR makes the behavior consistent and returns an error when the conflict is detected while running non interactively

@marcospb19 marcospb19 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking great

@marcospb19 marcospb19 merged commit 374a7d6 into ouch-org:main Jun 21, 2026
18 checks passed
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.

2 participants