diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-01-03 12:09:37 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-12-09 13:14:38 -0500 |
commit | b1f3629024daa51217c9fee20c1e545a9d8537b1 (patch) | |
tree | 8e0db290511b952294acc3a918ac8c14d9e9da3a | |
parent | fc8b5bf2275eff5fb209874d37b7161c9a93c37d (diff) | |
download | haskell-b1f3629024daa51217c9fee20c1e545a9d8537b1.tar.gz |
gitlab-ci: Run ci.sh through shellcheckwip/shellcheck
It is now shellcheck-clean.
-rwxr-xr-x | .gitlab/ci.sh | 9 | ||||
-rw-r--r-- | .gitlab/common.sh | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh index a647698303..962cc7063f 100755 --- a/.gitlab/ci.sh +++ b/.gitlab/ci.sh @@ -18,6 +18,7 @@ fi CABAL_CACHE="$TOP/${CABAL_CACHE:-cabal-cache}" +# shellcheck source=.gitlab/common.sh source "$TOP/.gitlab/common.sh" function time_it() { @@ -597,11 +598,11 @@ function run_hadrian() { # A convenience function to allow debugging in the CI environment. function shell() { - local cmd="*@" - if [ -z "$cmd" ]; then - cmd="bash -i" + local cmd=( "$@" ) + if [ -z "${cmd[*]}" ]; then + cmd=( "bash" "-i" ) fi - run "$cmd" + run "${cmd[@]}" } setup_locale diff --git a/.gitlab/common.sh b/.gitlab/common.sh index befb1493eb..6c487b9911 100644 --- a/.gitlab/common.sh +++ b/.gitlab/common.sh @@ -1,6 +1,10 @@ +#!/usr/bin/env bash + # Common bash utilities # ---------------------- +# shellcheck disable=SC2034 + # Colors BLACK="0;30" GRAY="1;30" |