Skip to content

Commit cff3fb7

Browse files
author
Christian Meißner
committed
fix command line parameters
1 parent a7304b3 commit cff3fb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

commit_hooks/puppet_manifest_documentation_check.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ fi
2323
# Check puppet manifest syntax
2424
$ERRORS_ONLY || echo -e "$(tput setaf 6)Checking puppet documentation for $manifest_name...$(tput sgr0)"
2525
if [[ $USE_PUPPET_FUTURE_PARSER != "enabled" ]]; then
26-
puppet strings --color=false "$1" | grep -Eo -e '^\[warn\]:.*$' > "$error_msg"
26+
puppet strings --color=false "$manifest_path" | grep -Eo -e '^\[warn\]:.*$' > "$error_msg"
2727
else
28-
puppet strings --parser future --color=false "$1" | grep -Eo -e '^\[warn\]:.*$' > "$error_msg"
28+
puppet strings --parser future --color=false "$manifest_path" | grep -Eo -e '^\[warn\]:.*$' > "$error_msg"
2929
fi
3030

3131
if [[ $? -ne 1 ]]; then
@@ -37,7 +37,7 @@ rm -f "$error_msg"
3737

3838
if [[ $documentations_errors -ne 0 ]]; then
3939
if [[ $CHECK_PUPPET_DOCS == "permissive" ]] ; then
40-
echo -e "(tput setaf 6)Documentation checks in permissive mode. Commit won't be aborted$(tput sgr0)"
40+
echo -e "$(tput setaf 6)Documentation checks in permissive mode. Commit won't be aborted$(tput sgr0)"
4141
else
4242
echo -e "$(tput setaf 1)Error: $documentations_errors faulty documentation(s) found in puppet manifests. Commit will be aborted.$(tput sgr0)"
4343
exit 1

0 commit comments

Comments
 (0)