[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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user