Skip to content

Commit f9484f9

Browse files
committed
rase exception when run cocos package fail
1 parent 1ad9331 commit f9484f9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

plugins/plugin_package/plugin_package.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ def parse_args(self, argv):
3131

3232
def run(self, argv, dependencies):
3333
cmd = self._get_sdkbox_path() + ' --runincocos ' + ' '.join(argv)
34-
self._run_cmd(cmd)
34+
retval = self._run_cmd(cmd)
35+
if 0 != retval:
36+
raise Exception('Run cocos package fail')
3537

3638
def _run_cmd(self, command, cwd=None):
3739
# cocos.CMDRunner.run_cmd(command, False, cwd=cwd)
38-
subprocess.call(command, shell=True, cwd=cwd)
40+
return subprocess.call(command, shell=True, cwd=cwd)
3941

4042
def _get_sdkbox_path(self):
4143
path = ''

plugins/plugin_package/sdkbox.pyc

1.66 KB
Binary file not shown.

0 commit comments

Comments
 (0)