From 9783119a7d76999c4dd9a8204dd7a482c7f5e4c6 Mon Sep 17 00:00:00 2001 From: yage Date: Thu, 22 Jun 2023 17:57:17 -0600 Subject: [PATCH] v3.0.2 ===================================================================== --- Bug fixes ---------------------------- - interactive scripts work again - color works on zx again --- run | 10 +++++----- zsh/lib/scwrypts/run.module.zsh | 2 +- zsh/lib/scwrypts/virtualenv.module.zsh | 8 ++++++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/run b/run index 9c0e59d..76c2c28 100755 --- a/run +++ b/run @@ -235,7 +235,7 @@ __RUN() { ########################################## - local LOGFILE=$(__GET_LOGFILE $SCRIPT) + local LOGFILE=$(__GET_LOGFILE) local HEADER=$( [ $SUBSCWRYPT ] && return 0 @@ -308,13 +308,13 @@ __VALIDATE_UPSTREAM_TIMELINE() { } __GET_LOGFILE() { - local SCRIPT="$1" - [ $SUBSCWRYPT ] \ - || [[ $SCRIPT =~ scwrypts/logs ]] \ - || [[ $SCRIPT =~ interactive ]] \ + || [[ $SCWRYPT_NAME =~ scwrypts/logs ]] \ + || [[ $SCWRYPT_NAME =~ interactive ]] \ && return 0 + echo 'gets a logfile' >&2 + echo "$SCWRYPTS_LOG_PATH/$(echo $GROUP/$TYPE/$NAME | sed 's/^\.\///; s/\//\%/g').log" } diff --git a/zsh/lib/scwrypts/run.module.zsh b/zsh/lib/scwrypts/run.module.zsh index 30c37d7..2088e2c 100644 --- a/zsh/lib/scwrypts/run.module.zsh +++ b/zsh/lib/scwrypts/run.module.zsh @@ -116,5 +116,5 @@ SCWRYPTS__GET_RUNSTRING__py() { SCWRYPTS__GET_RUNSTRING__zx() { __CHECK_DEPENDENCY zx || return 1 - echo "FORCE_COLOR=3; cd $GROUP_PATH; ./$TYPE/$NAME.js" + echo "export FORCE_COLOR=3; cd $GROUP_PATH; ./$TYPE/$NAME.js" } diff --git a/zsh/lib/scwrypts/virtualenv.module.zsh b/zsh/lib/scwrypts/virtualenv.module.zsh index ce96eb6..b4c1e4b 100644 --- a/zsh/lib/scwrypts/virtualenv.module.zsh +++ b/zsh/lib/scwrypts/virtualenv.module.zsh @@ -49,7 +49,7 @@ UPDATE_VIRTUALENV() { cd $SCWRYPTS_ROOT local UPDATE_CODE=0 case $TYPE in - py ) cd py; pip install -r requirements.txt; UPDATE_CODE=$? ;; + py ) cd py; pip install --no-cache-dir -r requirements.txt; UPDATE_CODE=$? ;; zx ) cd zx; npm install ;; esac UPDATE_CODE=$? @@ -83,7 +83,11 @@ DELETE_VIRTUALENV() { GET_VIRTUALENV_PATH() { local GROUP="$1" local TYPE="$2" - eval echo '$SCWRYPTS_VIRTUALENV_PATH__'$GROUP/$TYPE + + local ENV_PATH="$(eval echo '$SCWRYPTS_VIRTUALENV_PATH__'$GROUP 2>/dev/null)" + [ ! $ENV_PATH ] && ENV_PATH="$SCWRYPTS_VIRTUALENV_PATH__scwrypts" + + echo $ENV_PATH/$TYPE } #####################################################################