summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorruki <[email protected]>2021-05-01 12:04:26 +0800
committerGitHub <[email protected]>2021-05-01 12:04:26 +0800
commitba285402bd1f5fed3eedc5a507ec98a232de8c27 (patch)
tree538e290d69391b43ccc00bea871f3bc07a2cd76a /scripts
parent92dae28e3b2504a38f2d941b273ba49e76beb9e8 (diff)
parentda9df20cfb4e99275c0da8ea08a5a94608cb54cd (diff)
Merge pull request #1376 from xq114/dev
fix xrepo stuck on config
Diffstat (limited to 'scripts')
-rw-r--r--scripts/xrepo-hook.psm13
-rwxr-xr-xscripts/xrepo.bat6
-rw-r--r--scripts/xrepo.ps13
3 files changed, 10 insertions, 2 deletions
diff --git a/scripts/xrepo-hook.psm1 b/scripts/xrepo-hook.psm1
index 5874203fd..902ef3b16 100644
--- a/scripts/xrepo-hook.psm1
+++ b/scripts/xrepo-hook.psm1
@@ -16,6 +16,9 @@ function Enter-XrepoEnvironment {
$script:xrepoOldEnvs = (Get-ChildItem -Path Env:);
& $Env:XMAKE_EXE lua private.xrepo.action.env.info config;
+ if (-not $?) {
+ Exit 1;
+ }
$xmakeColorTermBackup, $Env:XMAKE_COLORTERM = $Env:XMAKE_COLORTERM, "nocolor";
$xrepoPrompt = (& $Env:XMAKE_EXE lua private.xrepo.action.env.info prompt | Out-String);
diff --git a/scripts/xrepo.bat b/scripts/xrepo.bat
index 1a4a230ca..c8714a11c 100755
--- a/scripts/xrepo.bat
+++ b/scripts/xrepo.bat
@@ -19,6 +19,9 @@
setlocal EnableDelayedExpansion
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 private.xrepo.action.env.info prompt 1>nul
if !errorlevel! neq 0 (
echo error: xmake.lua not found^^!
@@ -33,6 +36,9 @@
) else (
setlocal EnableDelayedExpansion
%XMAKE_EXE% lua private.xrepo.action.env.info config
+ if !errorlevel! neq 0 (
+ exit /B !errorlevel!
+ )
@%XMAKE_EXE% lua private.xrepo.action.env.info prompt 1>nul
if !errorlevel! neq 0 (
echo error: xmake.lua not found^^!
diff --git a/scripts/xrepo.ps1 b/scripts/xrepo.ps1
index 620f67cc6..a821d8057 100644
--- a/scripts/xrepo.ps1
+++ b/scripts/xrepo.ps1
@@ -29,6 +29,5 @@ if ($Args.Count -eq 0) {
}
}
- $OtherArgs = @();
- & $Env:XMAKE_EXE lua private.xrepo $Command @OtherArgs;
+ & $Env:XMAKE_EXE lua private.xrepo $Args;
}