From 620d07f1a81261f2797c18b0bc5cf2e740a3013b Mon Sep 17 00:00:00 2001 From: yage Date: Tue, 27 Jun 2023 18:30:29 -0600 Subject: [PATCH] v3.2.1 ===================================================================== --- Bug Fixes ---------------------------- - fixed bug with initializing virtual environments --- zsh/lib/scwrypts/virtualenv.module.zsh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zsh/lib/scwrypts/virtualenv.module.zsh b/zsh/lib/scwrypts/virtualenv.module.zsh index b4c1e4b..0519c84 100644 --- a/zsh/lib/scwrypts/virtualenv.module.zsh +++ b/zsh/lib/scwrypts/virtualenv.module.zsh @@ -37,7 +37,11 @@ UPDATE_VIRTUALENV() { local VIRTUALENV_PATH=$(GET_VIRTUALENV_PATH $GROUP $TYPE) - [ ! -d $VIRTUALENV_PATH ] && CREATE_VIRTUALENV__${GROUP}__${TYPE} $VIRTUALENV_PATH + [ ! -d $VIRTUALENV_PATH ] && { + which CREATE_VIRTUALENV__${GROUP}__${TYPE} >/dev/null 2>&1 \ + && CREATE_VIRTUALENV__${GROUP}__${TYPE} $VIRTUALENV_PATH \ + || return 0 + } STATUS "updating $TYPE virtual environment" @@ -125,7 +129,7 @@ CREATE_VIRTUALENV__scwrypts__zx() { nodeenv $VIRTUALENV_PATH --node=$SCWRYPTS_NODE_VERSION__scwrypts \ && SUCCESS 'node virtualenv created' \ || { - ERROR "unable to create '$VIRTUALENV_PATH' with '$SCWRYPTS__NODE_VERSION'" + ERROR "unable to create '$VIRTUALENV_PATH' with '$SCWRYPTS_NODE_VERSION__scwrypts'" return 2 } }