Nishantsinghhhhhh
New member
I encountered an error while trying to commit on Ubuntu:
.husky/pre-commit: 2: set: Illegal option -o pipefail<br>husky - pre-commit script failed (code 2)<br>
The Issue:The .husky/pre-commit script uses set -o pipefail, which is a Bash feature. However, the file's header (#!/usr/bin/env sh) forces it to run using sh (which is Dash on Ubuntu). Dash does not support pipefail, causing the crash.
Is anybody else facing this same error, or is it just happening on my setup?

.husky/pre-commit: 2: set: Illegal option -o pipefail<br>husky - pre-commit script failed (code 2)<br>
The Issue:The .husky/pre-commit script uses set -o pipefail, which is a Bash feature. However, the file's header (#!/usr/bin/env sh) forces it to run using sh (which is Dash on Ubuntu). Dash does not support pipefail, causing the crash.
Is anybody else facing this same error, or is it just happening on my setup?
