Skip to content

Commit 3158069

Browse files
committed
Address shellcheck notices in nancy run.sh
SC2292: use \`[[ ]]\` instead of \`[ ]\` for the bash conditional. SC2250: brace the variable references on the username/token args. Trunk Check (threshold: trunk=high) escalates shellcheck notices to failures, so the bash gating block Eli added in b35325e is breaking Trunk Check across the PR.
1 parent b35325e commit 3158069

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

linters/nancy/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ set -eu
44

55
set -- --output=json --skip-update-check
66

7-
if [ -n "${OSS_INDEX_USERNAME-}" ] && [ -n "${OSS_INDEX_TOKEN-}" ]; then
8-
set -- "$@" --username "$OSS_INDEX_USERNAME" --token "$OSS_INDEX_TOKEN"
7+
if [[ -n ${OSS_INDEX_USERNAME-} && -n ${OSS_INDEX_TOKEN-} ]]; then
8+
set -- "$@" --username "${OSS_INDEX_USERNAME}" --token "${OSS_INDEX_TOKEN}"
99
fi
1010

1111
go list -json -deps ./... | nancy sleuth "$@"

0 commit comments

Comments
 (0)