Skip to content

fix: redirect log() output to stderr to prevent capture in subshell#42

Merged
wcgomes merged 2 commits intomainfrom
fix/log-output-to-stderr
Apr 27, 2026
Merged

fix: redirect log() output to stderr to prevent capture in subshell#42
wcgomes merged 2 commits intomainfrom
fix/log-output-to-stderr

Conversation

@wcgomes
Copy link
Copy Markdown
Owner

@wcgomes wcgomes commented Apr 26, 2026

The log() function was outputting to stdout, which caused issues when used inside $(...) command substitution - messages were captured along with the expected return value (file path), causing 'No such file or directory' errors when attempting to execute the script.

Changed log() to redirect to stderr (>&2) so output is not captured by command substitution.

Test added 2 commits April 26, 2026 23:13
The log() function was outputting to stdout, which caused issues when
used inside $(...) command substitution - messages were captured
along with the expected return value (file path), causing 'No such
file or directory' errors when attempting to execute the script.

Changed log() to redirect to stderr (\>&2) so output is not captured
by command substitution.
The log() function was outputting to stdout, which caused issues when
used inside $(...) command substitution - messages were captured
along with the expected return value (file path), causing 'No such
file or directory' errors when attempting to execute the script.

Changed log() to redirect to stderr (\>&2) so output is not captured
by command substitution.
@wcgomes wcgomes merged commit e828eb8 into main Apr 27, 2026
13 checks passed
@wcgomes wcgomes deleted the fix/log-output-to-stderr branch April 27, 2026 00:47
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.

1 participant