`gh-clone': not a valid identifier when running 'source common_utils.sh' as root on MacOS
Closed this issue · 1 comments
ogarod commented
On MacOS, attempting to 'source' a bash script under the root user fails if it has function names with hyphens. Running source common_utils.sh
as root after checking out this repository on Mojave and High Sierra fails with the following error:
common_utils.sh: line 94: `gh-clone': not a valid identifier
Hyphens should not be used in function names, so the error message sort of makes sense: https://stackoverflow.com/questions/28114999/what-are-the-rules-for-valid-identifiers-e-g-functions-vars-etc-in-bash
matthew-brett commented
Fair enough - any interest in a pull request?