Skip to content

Commit

Permalink
Rewrote prune prompt logic, wont prompt if none-interactive flags are…
Browse files Browse the repository at this point in the history
… used
  • Loading branch information
mag37 committed Aug 17, 2024
1 parent 29dffbb commit 7d825f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dockcheck.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERSION="v0.4.7"
### ChangeNotes: Notification template changes for: gotify(new), DSM(improved), SMTP(deprecation alternative).
VERSION="v0.4.8"
### ChangeNotes: Rewrote prune to not prompt (default no) if -a|-y or -n flags are used. -p will still autoprune.
Github="https://github.com/mag37/dockcheck"
RawUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/dockcheck.sh"

Expand Down Expand Up @@ -333,7 +333,7 @@ if [ -n "$GotUpdates" ] ; then
fi
done
printf "\n%bAll done!%b\n" "$c_green" "$c_reset"
[[ -z "$AutoPrune" ]] && read -r -p "Would you like to prune dangling images? y/[n]: " AutoPrune
if [[ -z "$AutoPrune" ]] && [[ -z "$AutoUp" ]]; then read -r -p "Would you like to prune dangling images? y/[n]: " AutoPrune ; fi
[[ "$AutoPrune" =~ [yY] ]] && docker image prune -f
else
printf "\nNo updates installed, exiting.\n"
Expand Down

0 comments on commit 7d825f3

Please sign in to comment.