sh scripts/format.shWhen trying to run sh scripts/format.sh receive an error:
Received an error trying to run it: 6: set: Illegal option -o pipefail
I could not diagnose the problem as shell is not my forte, but recommend you look into it as other contributors may suffer from the same problem. Removing the option led to a builtin not found complaint.
bash scripts/format.sh should work.
Sorry I should be more clear. Ubuntu sh is linked to dash not bash. pipefail is a bash utility.
ubuntu@ip-172-31-23-126:~$ cat /etc/os-release | grep VERSION
VERSION="19.04 (Disco Dingo)"
VERSION_ID="19.04"
VERSION_CODENAME=disco
ubuntu@ip-172-31-23-126:~$ cat test.sh
set -eo pipefail
echo "done"
ubuntu@ip-172-31-23-126:~$ bash test.sh
done
ubuntu@ip-172-31-23-126:~$ sh test.sh
test.sh: 1: set: Illegal option -o pipefail
Worked, closing. Perhaps the default "I have run scripts/format.sh" on PR should be updated to say "use bash not sh".
Most helpful comment
Sorry I should be more clear. Ubuntu sh is linked to
dashnotbash.pipefailis a bash utility.