File tree Expand file tree Collapse file tree
common/execCommand/component Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @serverless-devs/core" ,
3- "version" : " 0.1.66-beta.4 " ,
3+ "version" : " 0.1.66" ,
44 "description" : " Serverless Devs Tool Core Component" ,
55 "keywords" : [
66 " Serverless" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ Type: Component
22Name : core
33Provider :
44 - 阿里云
5- Version : dev
5+ Version : 0.1.66
66Description : Serverless Devs 核心组件
77HomePage : https://github.com/Serverless-Devs/core
88Tags : # 标签详情
Original file line number Diff line number Diff line change @@ -55,8 +55,10 @@ class Hook {
5555 if ( fs . existsSync ( execPath ) && fs . lstatSync ( execPath ) . isDirectory ( ) ) {
5656 logger . debug ( `cwd: ${ execPath } ` )
5757 logger . debug ( `process.env.PATH: ${ process . env . PATH } ` )
58+
59+ let result ;
5860 try {
59- spawnSync ( configs . value , {
61+ result = spawnSync ( configs . value , {
6062 cwd : execPath ,
6163 stdio : 'inherit' ,
6264 shell : true ,
@@ -74,6 +76,14 @@ class Hook {
7476 serviceName : get ( this . inputs , 'project.projectName' ) ,
7577 } ) ;
7678 }
79+
80+ if ( result . error || result . status !== 0 || result . signal !== null ) {
81+ const errStr = `Command failed with exit code ${ result . status } : ${ configs . value } ` ;
82+ throwError ( {
83+ error : { message : errStr } ,
84+ serviceName : get ( this . inputs , 'project.projectName' ) ,
85+ } ) ;
86+ }
7787 }
7888 }
7989
Original file line number Diff line number Diff line change 11module . exports = {
2- DEFAULT_CORE_VERSION : 'dev ' ,
2+ DEFAULT_CORE_VERSION : '0.1.66 ' ,
33} ;
You can’t perform that action at this time.
0 commit comments