Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions hooks/packer_fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ for path in "${UNIQUE_PATHS[@]}"; do
pids+=("$!")
done

exec 3>&1 < /dev/tty > /dev/tty
tty_settings=$(stty -g)

error=0
exit_code=0
for pid in "${pids[@]}"; do
Expand All @@ -37,6 +40,8 @@ for pid in "${pids[@]}"; do
fi
done

stty "$tty_settings"

if [[ $error -ne 0 ]]; then
exit 1
fi