Skip to content

Commit d262cbb

Browse files
authored
feat(helmlint): Make it possible to use --strict in args (#127)
1 parent b66e5f6 commit d262cbb

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

hooks/helmlint.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,17 @@ helm_lint_opts=""
112112
files=()
113113

114114
handle_options() {
115-
while [ $# -gt 0 ]; do
115+
while(($#)) ; do
116116
case $1 in
117117
--kube-version)
118-
helm_lint_opts+="$1 $2"
118+
helm_lint_opts+="$1 $2 "
119119
shift
120120
;;
121+
--strict)
122+
helm_lint_opts+="$1 "
123+
;;
121124
*)
122-
files+=( "$1" )
125+
files+=("$1")
123126
;;
124127
esac
125128
shift
@@ -129,7 +132,7 @@ handle_options() {
129132
handle_options "$@"
130133
debug "Passed args: $helm_lint_opts"
131134

132-
for file in "$@"; do
135+
for file in "${files[@]}"; do
133136
debug "Checking $file"
134137
file_chart_path=$(chart_path "$file")
135138
debug "Resolved $file to chart path $file_chart_path"

0 commit comments

Comments
 (0)