Skip to content

Conversation

@ipalopezhentsev
Copy link
Contributor

@ipalopezhentsev ipalopezhentsev commented Jan 4, 2026

On Windows, external_command calls windows_command which prepares a bat file with the command, surrounded with code page saving/restoration. If the "real" command fails, its error return code does not get anywhere and 0 is always returned, because the last line is a chcp call which always succeeds. This breaks error handling logic in scripts, e.g. enfuseAdvanced, where they think everything went fine when it didn't.

On Windows, external_command calls windows_command which prepares a bat file with the command, surrounded with code page saving/restoration. If the "real" command fails, its error return code does not get anywhere and 0 is always returned, because the last line is a chcp call which always succeeds.
This breaks error logic in scripts, e.g. enfuseAdvanced, where they think everything went fine when it didn't.
@wpferguson
Copy link
Member

Looks good to me, thanks

@wpferguson wpferguson merged commit fbe504b into darktable-org:master Jan 4, 2026
@ipalopezhentsev ipalopezhentsev deleted the patch-1 branch January 4, 2026 19:09
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