Only log after parsing all arguments

This commit is contained in:
Salt 2019-06-22 02:16:47 -05:00
parent 8681346661
commit 5503648f6c

View File

@ -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