diff options
| author | xq114 <[email protected]> | 2021-08-24 22:21:17 +0800 |
|---|---|---|
| committer | xq114 <[email protected]> | 2021-08-24 22:21:17 +0800 |
| commit | b54b0ba654bb8b230efff2bd709839cf32bfb87e (patch) | |
| tree | 6e71cff5dcb8156696349dbb30496cea59f013cd /scripts | |
| parent | e273de15d253d4dc1b904e4fa0da5fb1bbe57304 (diff) | |
make prompt output more robust
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/register-virtualenvs.sh | 2 | ||||
| -rwxr-xr-x | scripts/xrepo.bat | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/register-virtualenvs.sh b/scripts/register-virtualenvs.sh index 13a661435..700d8dd99 100644 --- a/scripts/register-virtualenvs.sh +++ b/scripts/register-virtualenvs.sh @@ -19,7 +19,7 @@ function xrepo { unset XMAKE_ENV_BACKUP fi "$XMAKE_EXE" lua private.xrepo.action.env.info config || return 1 - local prompt="$("$XMAKE_EXE" lua private.xrepo.action.env.info prompt)" || return 1 + local prompt="$("$XMAKE_EXE" lua --quiet private.xrepo.action.env.info prompt)" || return 1 if [ -z "${prompt+x}" ]; then return 1 fi diff --git a/scripts/xrepo.bat b/scripts/xrepo.bat index c8714a11c..77acf7d24 100755 --- a/scripts/xrepo.bat +++ b/scripts/xrepo.bat @@ -22,7 +22,7 @@ if !errorlevel! neq 0 ( exit /B !errorlevel! ) - @%XMAKE_EXE% lua private.xrepo.action.env.info prompt 1>nul + @%XMAKE_EXE% lua --quiet private.xrepo.action.env.info prompt 1>nul if !errorlevel! neq 0 ( echo error: xmake.lua not found^^! exit /B !errorlevel! @@ -39,13 +39,13 @@ if !errorlevel! neq 0 ( exit /B !errorlevel! ) - @%XMAKE_EXE% lua private.xrepo.action.env.info prompt 1>nul + @%XMAKE_EXE% lua --quiet private.xrepo.action.env.info prompt 1>nul if !errorlevel! neq 0 ( echo error: xmake.lua not found^^! exit /B !errorlevel! ) endlocal - for /f %%i in ('@%XMAKE_EXE% lua private.xrepo.action.env.info prompt') do @( + for /f %%i in ('@%XMAKE_EXE% lua --quiet private.xrepo.action.env.info prompt') do @( @set "PROMPT=%%i %PROMPT%" ) @set XMAKE_PROMPT_BACKUP=%PROMPT% |
