mirror of https://github.com/coder/coder.git
fix shellcheck issues
This commit is contained in:
parent
03f793c18d
commit
db3aad76e1
|
@ -4,6 +4,7 @@
|
|||
# [#pr-deployments](https://codercom.slack.com/archives/C05DNE982E8) Slack channel
|
||||
|
||||
set -euo pipefail
|
||||
# shellcheck source=scripts/lib.sh
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
|
||||
cdroot
|
||||
|
||||
|
|
|
@ -133,7 +133,16 @@ requiredenvs() {
|
|||
gh_auth() {
|
||||
local fail=0
|
||||
if [[ "${CODER:-}" == "true" ]]; then
|
||||
export GITHUB_TOKEN=$(coder external-auth access-token github)
|
||||
if ! output=$(coder external-auth access-token github 2>&1); then
|
||||
log "ERROR: Could not authenticate with GitHub."
|
||||
log "$output"
|
||||
fail=1
|
||||
else
|
||||
GITHUB_TOKEN=$(coder external-auth access-token github)
|
||||
export GITHUB_TOKEN
|
||||
fi
|
||||
else
|
||||
log "Please authenticate gh CLI by running 'gh auth login'"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue