From 1ec0e066fd92976540bcfb92e8fc4efd27348876 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 11 May 2023 22:59:33 -0700 Subject: [PATCH] fix exit code --- .github/workflows/lint.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a5c46d3086c6..3b6c5a64c428 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,16 +15,20 @@ jobs: - uses: Expensify/App/.github/actions/composite/setupNode@main - - name: Lint JavaScript with ESLint - run: npm run lint - env: - CI: true - - - name: Lint shell scripts with ShellCheck - run: npm run shellcheck +# - name: Lint JavaScript with ESLint +# run: npm run lint +# env: +# CI: true +# +# - name: Lint shell scripts with ShellCheck +# run: npm run shellcheck - name: Verify there's no Prettier diff run: | source ./scripts/shellUtils.sh npm run prettier - git diff --name-only --exit-code || error 'Error: Prettier diff detected! Please run \`npm run prettier\` and commit the changes.' + if ! git diff --name-only --exit-code; then + # shellcheck disable=SC2016 + echo 'Error: Prettier diff detected! Please run `npm run prettier` and commit the changes.' + exit 1 + fi