File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ if [[ -z ${files:-} ]] ; then
3535fi
3636
3737echo " +++ Running shellcheck on ${# files[@]} files"
38- if docker run --rm -v " $PWD :/mnt" koalaman/shellcheck " ${files[@]} " ; then
38+ if docker run --rm -v " $PWD :/mnt" --workdir " /mnt " koalaman/shellcheck " ${files[@]} " ; then
3939 echo " Files are ok ✅"
4040else
4141 exit 1
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ load '/usr/local/lib/bats/load.bash'
88 export BUILDKITE_PLUGIN_SHELLCHECK_FILES_0=" tests/testdata/test.sh"
99
1010 stub docker \
11- " run --rm -v $PWD :/mnt koalaman/shellcheck tests/testdata/test.sh : echo testing test.sh"
11+ " run --rm -v $PWD :/mnt --workdir /mnt koalaman/shellcheck tests/testdata/test.sh : echo testing test.sh"
1212
1313 run " $PWD /hooks/command"
1414
@@ -24,7 +24,7 @@ load '/usr/local/lib/bats/load.bash'
2424 export BUILDKITE_PLUGIN_SHELLCHECK_FILES_2=" missing"
2525
2626 stub docker \
27- " run --rm -v $PWD :/mnt koalaman/shellcheck tests/testdata/test.sh tests/testdata/subdir/llamas.sh tests/testdata/subdir/shell\ with\ space.sh' : echo testing test.sh"
27+ " run --rm -v $PWD :/mnt --workdir /mnt koalaman/shellcheck tests/testdata/test.sh tests/testdata/subdir/llamas.sh tests/testdata/subdir/shell\ with\ space.sh' : echo testing test.sh"
2828
2929 run " $PWD /hooks/command"
3030
@@ -38,7 +38,7 @@ load '/usr/local/lib/bats/load.bash'
3838 export BUILDKITE_PLUGIN_SHELLCHECK_FILES_0=" tests/testdata/subdir/llamas.sh"
3939
4040 stub docker \
41- " run --rm -v $PWD :/mnt koalaman/shellcheck tests/testdata/test.sh tests/testdata/subdir/llamas.sh tests/testdata/subdir/shell\ with\ space.sh' : echo shellcheck failed; exit 1"
41+ " run --rm -v $PWD :/mnt --workdir /mnt koalaman/shellcheck tests/testdata/test.sh tests/testdata/subdir/llamas.sh tests/testdata/subdir/shell\ with\ space.sh' : echo shellcheck failed; exit 1"
4242
4343 run " $PWD /hooks/command"
4444
You can’t perform that action at this time.
0 commit comments