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

Fix run-test for macOS standard tools #948

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

ahans
Copy link
Contributor

@ahans ahans commented Jan 28, 2024

BSD sed requires an argument with -i (backup file extension, disabling
backup file creation by providing an empty string; this is the default for GNU
sed when -i is specified without an argument).

Further, /bin/bash shipping with macOS 14 doesn't like ${*} when the
argument list is empty (at least in the context it is used in run-tests).
The fix of having a distinct message for the case where ${*} is empty also
improves the behavior for cases where a version of Bash is used that does not
complain about an empty ${*}.

This has been tested on macOS Sonoma 14.3, but probably also applies to earlier
versions.

BSD sed requires an argument with `-i` (backup file extension, disabling
backup file creation by providing an empty string; this is the default for GNU
sed when `-i` is specified without an argument).

Further, `/bin/bash` shipping with macOS 14 doesn't like `${*}` when the
argument list is empty (at least in the context it is used in `run-tests`).
The fix of having a distinct message for the case where `${*}` is empty also
improves the behavior for cases where a version of Bash is used that does not
complain about an empty `${*}`.

This has been tested on macOS Sonoma 14.3, but probably also applies to earlier
versions.
Copy link
Member

@ryanplusplus ryanplusplus left a comment

Choose a reason for hiding this comment

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

Thanks!

@ryanplusplus ryanplusplus merged commit c74aed0 into exercism:main Jan 29, 2024
5 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