Skip to content

Commit

Permalink
Update pre-commit-hook.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mihirhasan committed Jul 30, 2021
1 parent 4a535eb commit 62a6310
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/pre-commit-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@ terrascan_() {

let "index+=1"
done

#put arguments array into runnable string
PARAMS = ''
for i in "${arr[@]}"
do
PARAMS= "${PARAMS} ${i}"
done
echo $PARAMS
for path_uniq in $(echo "${paths[*]}" | tr ' ' '\n' | sort -u); do
path_uniq="${path_uniq//__REPLACED__SPACE__/ }"
pushd "$path_uniq" > /dev/null
echo 'args' ${ARGS[*]}
terrascan scan $ARGS
popd > /dev/null
done
Expand Down

0 comments on commit 62a6310

Please sign in to comment.