Skip to content

Conversation

@simonjbeaumont
Copy link
Collaborator

Motivation

The script that checks for unacceptable language used an invocation of paste that worked on Linux (i.e. in the CI), but not with the variant of paste preinstalled on Darwin platforms.

This meant it failed like this:

bash scripts/check-for-unacceptable-language.sh
** Checking for unacceptable language...
usage: paste [-s] [-d delimiters] file ...

Worse, the || true was in the wrong place so it failed silently.

Modifications

  • Use portable invocation of paste for Linux and Darwin.
  • Move the || true so that, when it fails, it fails hard.

Result

Can run the script on Darwin.

Testing

❯ bash scripts/check-for-unacceptable-language.sh
** Checking for unacceptable language...
** ✅ Found no unacceptable language.

❯ echo kill  >> README.md

❯ bash scripts/check-for-unacceptable-language.sh
** Checking for unacceptable language...
** ERROR: ❌ Found unacceptable language in files: README.md.

Signed-off-by: Si Beaumont <beaumont@apple.com>
@simonjbeaumont simonjbeaumont requested a review from czechboy0 May 4, 2023 13:17
@simonjbeaumont simonjbeaumont enabled auto-merge (squash) May 4, 2023 13:49
@simonjbeaumont simonjbeaumont merged commit 34a1118 into apple:main May 4, 2023
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