我有一个名为oneclick.bat的控制器批处理文件,代码如下:
rem batch controller
rem wait for email input for ssh key generation...
rem call copyEnv.bat
call generateSshKey.bat %1
call gitClone.bat
在generateSshKey.bat中,我启动一个powershell脚本,如下所示:
rem make sure powershell is able to run
powershell.exe set-executionpolicy remotesigned
rem start powershell and add ssh key to the server by ui aotumation
powershell.exe -noe -file SetSSHKeytoServer.ps1
然后gitClone.bat没有在命令窗口中运行
我如何才能运行gitClone.bat?
当您想返回到调用脚本时,不应使用带有阻止脚本返回的选项来运行PowerShell。-noe
从的最后一行删除generateSshKey.bat
。
-NoExit
Does not exit after running startup commands.
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句