Commit 34a1118
authored
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 <beaumont@apple.com>1 parent 9d61b8f commit 34a1118
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
0 commit comments