Fix: Changes to have command usage

This commit is contained in:
2023-05-05 22:59:14 +03:00
parent edd56c80eb
commit e5fe49834d
6 changed files with 24 additions and 8 deletions

View File

@@ -164,7 +164,9 @@ function section_brew
menu_usage "$USAGE_PREFIX" "${MENU[@]}"
;;
esac
} || menu_section "$USAGE_PREFIX" "brew not available on this system"
}
! have brew && menu_section "$USAGE_PREFIX" "brew not available on this system"
}
function section_dotfiles
@@ -207,7 +209,8 @@ function section_dotfiles
;;
yamlfmt)
# format yaml files
have yamlfmt && yamlfmt -conf "$DOTFILES/.yamlfmt" || msg_err "yamlfmt not found"
have yamlfmt && yamlfmt -conf "$DOTFILES/.yamlfmt"
! have yamlfmt && msg_err "yamlfmt not found"
;;
shfmt)
# Format shell scripts according to following rules.