From 5503648f6c4dda76a3f52f9f11865c695a12b712 Mon Sep 17 00:00:00 2001 From: Salt Date: Sat, 22 Jun 2019 02:16:47 -0500 Subject: [PATCH] Only log after parsing all arguments --- firestarter | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/firestarter b/firestarter index f22180b..2b070a9 100755 --- a/firestarter +++ b/firestarter @@ -535,10 +535,7 @@ main() { while getopts ":dgh" opt; do case $opt in d) - if [ -z "$_dryrun" ]; then - log "Performing a dry run" - _dryrun=1 - fi + _dryrun=1 ;; g) step_generate @@ -556,6 +553,7 @@ main() { ;; esac done + [ -n "$_dryrun" ] && log "Performing a dry run" step_check step_preexecute step_execute