diff options
| author | xq114 <[email protected]> | 2023-05-10 14:20:35 +0800 |
|---|---|---|
| committer | xq114 <[email protected]> | 2023-05-10 14:20:35 +0800 |
| commit | c8169591343bf62a970b2edffc90e26cfdfb2d31 (patch) | |
| tree | db1886141e5727d2d2990421c964850878ceba0c | |
| parent | 8ecdc87d0ed33c96caeeeb973702a56a1f8f4c2a (diff) | |
postpone env test to avoid locking
| -rwxr-xr-x | scripts/xrepo.bat | 12 | ||||
| -rw-r--r-- | xmake/scripts/virtualenvs/register-virtualenvs.sh | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/scripts/xrepo.bat b/scripts/xrepo.bat index 5017e3275..8cdd7a5b6 100755 --- a/scripts/xrepo.bat +++ b/scripts/xrepo.bat @@ -36,18 +36,14 @@ exit /B 1 ) else ( setlocal EnableDelayedExpansion - @%XMAKE_EXE% lua --quiet private.xrepo.action.env | findstr . && ( - echo error: corrupt xmake.lua detected in the current directory^^! - exit /B 1 - ) - @%XMAKE_EXE% lua --quiet private.xrepo.action.env - if !errorlevel! neq 0 ( - exit /B !errorlevel! - ) %XMAKE_EXE% lua private.xrepo.action.env.info config if !errorlevel! neq 0 ( exit /B !errorlevel! ) + @%XMAKE_EXE% lua --quiet private.xrepo.action.env | findstr . && ( + echo error: corrupt xmake.lua detected in the current directory^^! + exit /B 1 + ) @%XMAKE_EXE% lua --quiet private.xrepo.action.env.info prompt 1>nul if !errorlevel! neq 0 ( echo error: xmake.lua not found^^! diff --git a/xmake/scripts/virtualenvs/register-virtualenvs.sh b/xmake/scripts/virtualenvs/register-virtualenvs.sh index 1f389b99e..ac82e9b94 100644 --- a/xmake/scripts/virtualenvs/register-virtualenvs.sh +++ b/xmake/scripts/virtualenvs/register-virtualenvs.sh @@ -36,12 +36,12 @@ function xrepo { unset XMAKE_PROMPT_BACKUP unset XMAKE_ENV_BACKUP fi + "$XMAKE_EXE" lua private.xrepo.action.env.info config || return 1 local currentTest="$("$XMAKE_EXE" lua --quiet private.xrepo.action.env)" || return 1 if [ ! -z "$currentTest" ]; then echo "error: corrupt xmake.lua detected in the current directory!" return 1 fi - "$XMAKE_EXE" lua private.xrepo.action.env.info config || return 1 local prompt="$("$XMAKE_EXE" lua --quiet private.xrepo.action.env.info prompt)" || return 1 if [ -z "${prompt+x}" ]; then return 1 |
