From c1150c41ab36a0bad31860513e11feea5b8996dd Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 26 Nov 2018 11:18:11 -0800 Subject: [PATCH] [Tests] avoid using shopt in zsh --- test/fast/Unit tests/nvm_command_info | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/fast/Unit tests/nvm_command_info b/test/fast/Unit tests/nvm_command_info index d69e61a..625e550 100755 --- a/test/fast/Unit tests/nvm_command_info +++ b/test/fast/Unit tests/nvm_command_info @@ -19,8 +19,14 @@ WGET_EXPECTED_INFO="$(which wget)" cleanup # 2. test aliased wget -shopt -s expand_aliases -# enable expand_aliases to make alias working in interactive shell + +# enable expand_aliases/aliases to make alias work in interactive shell +if nvm_has shopt; then + shopt -s expand_aliases +elif nvm_has setopt; then + setopt aliases +fi + alias wget="wget -V" WGET_COMMAND_INFO="$(nvm_command_info wget)" WGET_EXPECTED_INFO="$(which wget) (wget -V)"