Batch script command automatically stops batch scr

2020-04-04 05:10发布

I am experiencing a strange issue with the following batch script run via cmd.exe on Windows:

@echo off
gradle wrapper
gradlew build
pause

This batch script only ever executes the first command, i.e. gradle wrapper. After that, the batch script automatically terminates and the command gradlew build is never executed.

Is there any way I can force the batch script so that it cannot be stopped by gradle wrapper and continues its execution normally after gradle wrapper has been called?

1条回答
Fickle 薄情
2楼-- · 2020-04-04 05:56

I have a feeling you may need to precede with call:

call gradle…
查看更多
登录 后发表回答