From 9b07602c8e09a97f030986052a7841e3e2bb9bc8 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Mon, 28 Oct 2024 03:15:02 +0800 Subject: [PATCH] unittestCheckHook: lint with ShellCheck --- .../interpreters/python/hooks/unittest-check-hook.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/hooks/unittest-check-hook.sh b/pkgs/development/interpreters/python/hooks/unittest-check-hook.sh index 8795b680a310..3ee947e278e6 100644 --- a/pkgs/development/interpreters/python/hooks/unittest-check-hook.sh +++ b/pkgs/development/interpreters/python/hooks/unittest-check-hook.sh @@ -1,4 +1,6 @@ # Setup hook for unittest. +# shellcheck shell=bash + echo "Sourcing unittest-check-hook" unittestCheckPhase() { @@ -18,7 +20,7 @@ unittestCheckPhase() { echo "Finished executing unittestCheckPhase" } -if [ -z "${dontUseUnittestCheck-}" ] && [ -z "${installCheckPhase-}" ]; then +if [[ -z "${dontUseUnittestCheck-}" ]] && [[ -z "${installCheckPhase-}" ]]; then echo "Using unittestCheckPhase" appendToVar preDistPhases unittestCheckPhase fi