-
Notifications
You must be signed in to change notification settings - Fork 189
Closed
Description
Error
shellcheck reported issue in this script: SC2043:warning:1:13: This loop will only ever run once. Bad quoting or missing glob/expansion?
GitHub Actions
The following step causes the error. (I'm using an example in https://github.com/tj-actions/changed-files)
run: |
for file in ${{ steps.changed-files.outputs.shell_all_changed_files }}; do
echo "$file was changed"
shellcheck "$file"
done
Is there any way to write this step to make shellcheck pass?
full yaml
name: shellcheck
on:
pull_request:
paths:
- '**.sh'
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: changed shell scripts
id: changed-files
uses: tj-actions/changed-files@v39
with:
files_yaml: |
shell:
- '**.sh'
- name: run shellcheck for all changed shell scripts
if: steps.changed-files.outputs.shell_any_changed == 'true'
run: |
for file in ${{ steps.changed-files.outputs.shell_all_changed_files }}; do
echo "$file was changed"
shellcheck "$file"
done
Metadata
Metadata
Assignees
Labels
No labels