Skip to content

Commit

Permalink
fix: exit on error after type evaluation
Browse files Browse the repository at this point in the history
The evaluations for kubectl, helm, and kubeseal could fail which would
cause the script to prematurely exit.
  • Loading branch information
dmccaffery committed Nov 5, 2019
1 parent ff07cf3 commit 8a4fe6a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions init.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
#!/usr/bin/env bash

# exit on error, unset variable, or when a pipe fails
set -euo pipefail

# enable globstar
shopt -s globstar

# get the current path
CURRENT_PATH=$(pwd)

Expand All @@ -23,6 +17,12 @@ KUBECTL=$(type -p kubectl)
HELM=$(type -p helm)
KUBESEAL=$(type -p kubeseal)

# exit on error, unset variable, or when a pipe fails
set -uo pipefail

# enable globstar
shopt -s globstar

__cluster_init() {

# set defaults
Expand Down

0 comments on commit 8a4fe6a

Please sign in to comment.