From 9a44d6ae37fa04810ff9809c9d59e5839aba3877 Mon Sep 17 00:00:00 2001 From: Bruno Postle Date: Mon, 31 Aug 2026 17:11:06 +0100 Subject: [PATCH] Run the checks under bash, not sh First run on the ifc runner failed both jobs at exit 127 with "shopt: not found". The runner executes a `run:` block with /bin/sh (dash) unless the step says otherwise, where GitHub defaults to bash -- so `shopt -s globstar` died before either script reached a file. Setting `shell: bash` explicitly is the fix. The `[[ ]]` tests and the array handling in ids-lint need it too, so this is load-bearing rather than tidiness. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01T93BEAfP4jvcYo7oMo5AL1 --- .forgejo/workflows/ids-lint.yml | 6 ++++++ .forgejo/workflows/ifc-lint.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.forgejo/workflows/ids-lint.yml b/.forgejo/workflows/ids-lint.yml index df6b3bc..0bb1d7f 100644 --- a/.forgejo/workflows/ids-lint.yml +++ b/.forgejo/workflows/ids-lint.yml @@ -29,6 +29,12 @@ jobs: uses: actions/checkout@v4 - name: Run IDS validations + # shell: bash is REQUIRED, not decoration. The runner executes `run:` + # blocks with /bin/sh (dash) unless told otherwise, so the GitHub + # original's `shopt -s globstar` dies with "shopt: not found" and + # exit 127 before the first file is checked. `[[ ]]` and arrays need + # bash too. + shell: bash # Deliberately greps output instead of trusting the exit status: # ifctester's CLI has no sys.exit anywhere, so a model that violates # every rule still exits 0. A naive `run: ifctester ...` would be a diff --git a/.forgejo/workflows/ifc-lint.yml b/.forgejo/workflows/ifc-lint.yml index d991afc..21d3280 100644 --- a/.forgejo/workflows/ifc-lint.yml +++ b/.forgejo/workflows/ifc-lint.yml @@ -26,6 +26,12 @@ jobs: uses: actions/checkout@v4 - name: Run IFC lint checks + # shell: bash is REQUIRED, not decoration. The runner executes `run:` + # blocks with /bin/sh (dash) unless told otherwise, so the GitHub + # original's `shopt -s globstar` dies with "shopt: not found" and + # exit 127 before the first file is checked. `[[ ]]` and arrays need + # bash too. + shell: bash # Gates on its own exit status: ifcopenshell.validate calls sys.exit() # on failure, so `set -e` fails the job. run: |