File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ const upload = async (filePath, parts = []) => {
108108 logger . error ( error . message ) ;
109109 logger . error ( error . stack ) ;
110110 console . log ( chalk ( error . message ) ) ;
111- return ;
111+ process . exit ( 1 ) ;
112112 }
113113
114114
@@ -169,7 +169,7 @@ const getFileMD5Success = async (filePath) => {
169169 logger . error ( error . message ) ;
170170 logger . error ( error . stack ) ;
171171 console . log ( chalk . red ( ( error . response && error . response . data ) || error . message ) ) ;
172- return ;
172+ process . exit ( 1 ) ;
173173 }
174174}
175175
@@ -208,7 +208,7 @@ const getFileMD5 = async (filePath) => {
208208 console . log ( chalk . red ( ( error . response && error . response . data ) || error . message ) ) ;
209209 logger . error ( error . message ) ;
210210 logger . error ( error . stack ) ;
211- return ;
211+ process . exit ( 1 ) ;
212212 }
213213}
214214
@@ -217,7 +217,7 @@ const beforeUpload = async (filePath) => {
217217 const stat = fs . lstatSync ( filePath ) ;
218218 if ( stat . isDirectory ( ) ) {
219219 console . log ( chalk . red ( `\n${ filePath } 不合法,需指定一个文件\n` ) )
220- return ;
220+ process . exit ( 1 ) ;
221221 }
222222 fileSize = stat . size ;
223223 } catch ( error ) {
@@ -228,8 +228,7 @@ const beforeUpload = async (filePath) => {
228228 logger . error ( error . stack ) ;
229229 console . log ( chalk . red ( ( error . response && error . response . data ) || error . message ) ) ;
230230 }
231- process . exitCode = 1 ;
232- return ;
231+ process . exit ( 1 ) ;
233232 }
234233 await getFileMD5 ( filePath ) ;
235234}
Original file line number Diff line number Diff line change 11{
22 "name" : " coding-generic" ,
3- "version" : " 1.2.5 " ,
3+ "version" : " 1.2.6 " ,
44 "description" : " " ,
55 "main" : " index.js" ,
66 "bin" : {
You can’t perform that action at this time.
0 commit comments