diff options
| author | James Reilly <jreilly1821@gmail.com> | 2025-05-14 22:13:36 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-14 12:43:36 -0400 |
| commit | b7490fe2c9612f17fa8fc989b947707eee24ba38 (patch) | |
| tree | 315a79e56cf6feddc1d1511ea2c3e0989f7a9e47 | |
| parent | f825b61c85447dcba26f01747f9323e754b03eef (diff) | |
| download | AeroCore-OS-b7490fe2c9612f17fa8fc989b947707eee24ba38.tar.gz AeroCore-OS-b7490fe2c9612f17fa8fc989b947707eee24ba38.zip | |
fix(justfile): `just lint` and `just format` pass when `shellcheck` and `shfmt` do not exist (#105)
| -rw-r--r-- | Justfile | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -325,8 +325,24 @@ spawn-vm rebuild="0" type="qcow2" ram="6G": # Runs shell check on all Bash scripts lint: + #!/usr/bin/env bash + set -eoux pipefail + # Check if shellcheck is installed + if ! command -v shellcheck &> /dev/null; then + echo "shellcheck could not be found. Please install it." + exit 1 + fi + # Run shellcheck on all Bash scripts /usr/bin/find . -iname "*.sh" -type f -exec shellcheck "{}" ';' # Runs shfmt on all Bash scripts format: + #!/usr/bin/env bash + set -eoux pipefail + # Check if shfmt is installed + if ! command -v shfmt &> /dev/null; then + echo "shellcheck could not be found. Please install it." + exit 1 + fi + # Run shfmt on all Bash scripts /usr/bin/find . -iname "*.sh" -type f -exec shfmt --write "{}" ';' |
