Skip to content

Commit

Permalink
make command about to be run more visually clear
Browse files Browse the repository at this point in the history
  • Loading branch information
evnp committed Nov 9, 2023
1 parent 622f050 commit 70acc67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function nx() ( local pkg="" cmd="" npmcmds=""
[[ "${NX_NVM}" =~ ^(1|true|TRUE)$ ]] && nvm use &>/dev/null
# :: await confirmation of current node+npm versions before executing command :: export NX_CONFIRM=1; source "$HOME/nx/nx.sh" (to enable) ::
if [[ "${NX_CONFIRM}" =~ ^(1|true|TRUE)$ ]]; then
read -rsn1 -p "${cmd[*]} ${*}"$'\n'"Press any key to run · CTRL+C to cancel · node $( node -v ) · npm $( npm -v )"$'\n\n'
read -rsn1 -p "${cmd[*]} ${*}"$'\n'"${cmd[*]//?/˙} ${*//?/˙}"$'\n'"Press any key to run · CTRL+C to cancel · node $( node -v ) · npm $( npm -v )"$'\n\n'
fi
if (( $# )); then
"${cmd[@]}" "${@}" # :: execute npm command with additional args::
Expand Down

0 comments on commit 70acc67

Please sign in to comment.