diff --git a/.github/workflows/aomp-shell.yml b/.github/workflows/aomp-shell.yml index 27e573e1e..3878282e2 100644 --- a/.github/workflows/aomp-shell.yml +++ b/.github/workflows/aomp-shell.yml @@ -17,7 +17,7 @@ jobs: id: changed-files uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 with: - separator: ' ' + separator: '\n' skip_initial_fetch: true base_sha: 'HEAD~1' sha: 'HEAD' @@ -29,8 +29,8 @@ jobs: - name: Run shellcheck run: | shellcheck_status=0 - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - if [[ $file == *.sh ]] || [[ $(file "$file") =~ "shell script" ]]; then + while read -r file; do + if [[ "$file" == *.sh ]] || [[ $(file "$file") =~ "shell script" ]]; then file_dir=$(dirname "$file") file_name=$(basename "$file") @@ -43,6 +43,6 @@ jobs: popd || exit 1 fi - done + done <<< "${{ steps.changed-files.outputs.all_changed_files }}" exit $shellcheck_status shell: bash {0}