Skip to content

Fix test_escape() to work with any path to echo(1) #78

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

Merged
merged 1 commit into from
Aug 1, 2025

Conversation

delan
Copy link
Contributor

@delan delan commented Jul 31, 2025

on some Linux distros like NixOS, echo is not /bin/echo, but somewhere else. this patch removes the absolute path in test_escape(), so we can find echo anywhere in PATH.

@delan
Copy link
Contributor Author

delan commented Jul 31, 2025

thanks for making this very useful library! i have some more contributions to make soon :)

@delan
Copy link
Contributor Author

delan commented Jul 31, 2025

hmm, i didn’t realise echo is a built-in. in that case, we would need at least /usr/bin/env echo, which works on every Linux and BSD i know of, but is technically not one of the six paths guaranteed by posix 2024. but if it’s ok for the test to use the built-in, then we can just use echo.

@tao-guo tao-guo merged commit 7c664da into rust-shell-script:master Aug 1, 2025
1 check 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