shellcheck
shellcheck copied to clipboard
Stuck in a loop
I have a file called build-dry.sh, and it looks like this:
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1
cd .. && source build-dry.sh
When I run shellcheck on it, it blocks forever. I believe it is recursively checking itself? Is there a way to ask it to not follow that source?
...I worked around it like this:
# shellcheck disable=SC1091 source=/..
cd .. && source build-dry.sh
I'm unable to reproduce this as described with shellcheck -x build-dry.sh. Which version are you using?
hmmm.... v0.10.0. It is on https://github.com/DeterminateSystems/nix-src/blob/852075ec9d44f41083b8a6c107cc69335864e223/tests/functional/ca/build-dry.sh this file specifically:
Grahams-MacBook-Pro:nix-src grahamc$ shellcheck tests/functional/ca/build-dry.sh
<stalls forever at 100% cpu>