[FIX] web: lint tooling - exit script if cd fails

Ref:
- https://www.shellcheck.net/wiki/SC2164

closes odoo/odoo#107937

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit is contained in:
Pierre Paridans
2022-12-14 17:17:57 +01:00
parent 591c091c7a
commit bc325631b3
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
community=$(cd -- "$(dirname "$0")" &> /dev/null && cd ../../.. && pwd)
disableInDir () {
cd "$1"
cd "$1" || exit
git config --unset core.hooksPath
rm .eslintignore
rm .eslintrc.json
+1 -1
View File
@@ -8,7 +8,7 @@ if [[ $testRealPath == "" ]]; then
fi
enableInDir () {
cd "$1"
cd "$1" || exit
hooksPath="$(realpath --relative-to=. "$tooling/hooks")"
git config core.hooksPath "$hooksPath"
cp "$tooling/_eslintignore" .eslintignore
+1 -1
View File
@@ -8,7 +8,7 @@ if [[ $testRealPath == "" ]]; then
fi
refreshInDir () {
cd "$1"
cd "$1" || exit
cp "$tooling/_eslintignore" .eslintignore
cp "$tooling/_eslintrc.json" .eslintrc.json
cp "$tooling/_jsconfig.json" jsconfig.json