Skip to content

Commit

Permalink
[Fix] debug: correct mistaken -V to --version from #2922
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Oct 24, 2022
1 parent 095a4ca commit 924d77c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2997,7 +2997,7 @@ nvm() {
nvm_err "OS version: ${OS_VERSION}"
fi
if nvm_has "awk"; then
nvm_err "awk: $(nvm_command_info awk), $({ command awk -V 2>/dev/null || command awk -W version; } \
nvm_err "awk: $(nvm_command_info awk), $({ command awk --version 2>/dev/null || command awk -W version; } \
| command head -n 1)"
else
nvm_err "awk: not found"
Expand Down

3 comments on commit 924d77c

@ryenus
Copy link
Contributor

@ryenus ryenus commented on 924d77c Oct 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nice catch for sure, interesting that awk -V also works :-)

@ljharb
Copy link
Member Author

@ljharb ljharb commented on 924d77c Oct 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't work on my Mac - I get awk: unknown option -V ignored.

@ryenus
Copy link
Contributor

@ryenus ryenus commented on 924d77c Oct 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you're right, missed that, thank you 👍

Please sign in to comment.