Closed sondrelg closed 1 year ago
Was using tabs instead of spaces intentional?
I use shellcheck in my ci (and locally)
In the ci use format=diff and locally let it use the gcc format for output.
https://github.com/SickChill/sickchill/blob/master/.github/workflows/pythonpackage.yml#L60
No it wasn't 😅 Seems that's the default shfmt
configuration. Added an .editorconfig
file to revert to spaces.
Want to take another look at this @miigotu? 🙂 In particular, do you agree with the set -eo pipefail
addition? I think having the action fail when there's an issue in the shell script seems appropriate.
I'll go over the whole thing when I get home, but absolutely -eo pipefail
is necessary. If you set the indent spaces to 2 it will keep the spacing with the 2 convention commonly used for bash which helps with reading when you have deeper nesting down the road.
It would also make the changes in this PR more apparent.
Adds
shfmt
andshellcheck
to our linter setup. Only the${INSTALLATION_ARGUMENTS}
call inmain.sh:20
looks like it cannot be formatted according to shellcheck, so I've added ignore statements for those. This mainly re-formats the old script files.Also sets
set -eo pipefail
to make the action error properly. The "command poetry does not exist" output for when the installation failed is not very user friendly.