You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scripts: Use portable paste invocation in language check (#5)
### 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:
```console
❯ 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 <[email protected]>
0 commit comments