From ccc77c47a336fcc7d8bf4caa70db0e792c8505cc Mon Sep 17 00:00:00 2001 From: Bob Date: Sun, 22 Feb 2026 17:08:39 +0000 Subject: [PATCH] fix(ci): handle missing server log files in cleanup steps When aw-server-rust doesn't produce log files (e.g. logs go to stdout/stderr instead of files), the glob pattern in the cleanup steps fails because bash treats unmatched globs as literal strings. Fix: use `shopt -s nullglob` so unmatched globs expand to nothing, and switch `mv` to a for-loop that handles the empty case. This was causing false CI failures on the "aw-server-rust master" test matrix entry for every PR. --- .github/workflows/nodejs.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 3b76a3b8..9bab4452 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -179,8 +179,9 @@ jobs: - name: Print server logs to console if: ${{ always() }} shell: bash - run: - for file in ~/.cache/activitywatch/log/*/*.log; do echo $file; cat $file; echo; done + run: | + shopt -s nullglob + for file in ~/.cache/activitywatch/log/*/*.log; do echo "$file"; cat "$file"; echo; done - name: Move logs to subdir # Run this step even if e2e tests flag failure if: ${{ always() }} @@ -189,7 +190,8 @@ jobs: aw_version: ${{ matrix.aw-version }} run: | mkdir -p logs/dist/$aw_server/$aw_version - mv ~/.cache/activitywatch/log/*/*.log logs/dist/$aw_server/$aw_version + shopt -s nullglob + for file in ~/.cache/activitywatch/log/*/*.log; do mv "$file" "logs/dist/$aw_server/$aw_version/"; done - name: Upload logs if: ${{ always() }} uses: actions/upload-artifact@v4