Skip to content

Commit 095a4ca

Browse files
ryenusljharb
authored andcommitted
[Fix] debug: awk: not an option: --version
On Debian, the default awk/mawk doesn't support the '--version' option; instead there's mawk-specific '-W version'.
1 parent 9721791 commit 095a4ca

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

nvm.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -2996,6 +2996,12 @@ nvm() {
29962996
if [ -n "${OS_VERSION}" ]; then
29972997
nvm_err "OS version: ${OS_VERSION}"
29982998
fi
2999+
if nvm_has "awk"; then
3000+
nvm_err "awk: $(nvm_command_info awk), $({ command awk -V 2>/dev/null || command awk -W version; } \
3001+
| command head -n 1)"
3002+
else
3003+
nvm_err "awk: not found"
3004+
fi
29993005
if nvm_has "curl"; then
30003006
nvm_err "curl: $(nvm_command_info curl), $(command curl -V | command head -n 1)"
30013007
else
@@ -3008,7 +3014,7 @@ nvm() {
30083014
fi
30093015

30103016
local TEST_TOOLS ADD_TEST_TOOLS
3011-
TEST_TOOLS="git grep awk"
3017+
TEST_TOOLS="git grep"
30123018
ADD_TEST_TOOLS="sed cut basename rm mkdir xargs"
30133019
if [ "darwin" != "$(nvm_get_os)" ] && [ "freebsd" != "$(nvm_get_os)" ]; then
30143020
TEST_TOOLS="${TEST_TOOLS} ${ADD_TEST_TOOLS}"

0 commit comments

Comments
 (0)