From 32337e925fe2e70dd9d64256957942b925a9ad8b Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Tue, 21 Apr 2026 17:49:29 +0530 Subject: [PATCH 1/2] Fix quoting issues in run_verbose --- packcheck.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packcheck.sh b/packcheck.sh index 212c148..0db458c 100755 --- a/packcheck.sh +++ b/packcheck.sh @@ -1656,7 +1656,7 @@ determine_build_type() { echo "No cabal file found but a package.yaml file found" echo "Generating cabal file from package.yaml" # Generate cabal file from package.yaml - run_verbose "$STACKCMD query > /dev/null 2>&1" + run_verbose $STACKCMD query > /dev/null 2>&1 else if test $BUILD = "stack" -a -f "stack.yaml" then @@ -2230,7 +2230,7 @@ your .hlint.ignore file." found=$(grep "^$i$" .hlint.ignore) || true if test -z "$found" then - run_verbose_errexit "hlint $HLINT_OPTIONS $i" + run_verbose_errexit hlint $HLINT_OPTIONS $i fi done done @@ -2238,7 +2238,7 @@ your .hlint.ignore file." local target for target in $HLINT_TARGETS do - run_verbose_errexit "hlint $HLINT_OPTIONS $target" + run_verbose_errexit hlint $HLINT_OPTIONS $target done fi } From 74a50fd9bcb06907b822e910938dae795d0f23cc Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Tue, 21 Apr 2026 17:58:21 +0530 Subject: [PATCH 2/2] Handle BUILD_PACKAGE_ONLY correctly for hlint --- packcheck.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packcheck.sh b/packcheck.sh index 0db458c..6c21f99 100755 --- a/packcheck.sh +++ b/packcheck.sh @@ -2267,7 +2267,12 @@ start_hlint() { die "Use HLINT_VERSION option to install." fi run_verbose_errexit hlint --version - run_hlint + if test -n "$BUILD_DEPS_ONLY" + then + echo "hlint: nothing to do (BUILD_DEPS_ONLY=y)" + else + run_hlint + fi } install_docspec() { @@ -2707,12 +2712,6 @@ then die "Both [BUILD_DEPS_ONLY] and [BUILD_PACKAGE_ONLY] cannot be set at the same time." fi -if test "$BUILD" = "hlint" -a -n "$BUILD_PACKAGE_ONLY" -then - show_step "hlint: nothing to do (BUILD_PACKAGE_ONLY=y)" - exit 0 -fi - # Note that date, uname, cygpath, rm are used even before this point. This # informatory so that PATH argument can be cleaned up by looking at where the # tools are. Anything used in require_cmd can be listed here. But the danger is