File tree 2 files changed +6
-7
lines changed
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 = []) => {
108
108
logger . error ( error . message ) ;
109
109
logger . error ( error . stack ) ;
110
110
console . log ( chalk ( error . message ) ) ;
111
- return ;
111
+ process . exit ( 1 ) ;
112
112
}
113
113
114
114
@@ -169,7 +169,7 @@ const getFileMD5Success = async (filePath) => {
169
169
logger . error ( error . message ) ;
170
170
logger . error ( error . stack ) ;
171
171
console . log ( chalk . red ( ( error . response && error . response . data ) || error . message ) ) ;
172
- return ;
172
+ process . exit ( 1 ) ;
173
173
}
174
174
}
175
175
@@ -208,7 +208,7 @@ const getFileMD5 = async (filePath) => {
208
208
console . log ( chalk . red ( ( error . response && error . response . data ) || error . message ) ) ;
209
209
logger . error ( error . message ) ;
210
210
logger . error ( error . stack ) ;
211
- return ;
211
+ process . exit ( 1 ) ;
212
212
}
213
213
}
214
214
@@ -217,7 +217,7 @@ const beforeUpload = async (filePath) => {
217
217
const stat = fs . lstatSync ( filePath ) ;
218
218
if ( stat . isDirectory ( ) ) {
219
219
console . log ( chalk . red ( `\n${ filePath } 不合法,需指定一个文件\n` ) )
220
- return ;
220
+ process . exit ( 1 ) ;
221
221
}
222
222
fileSize = stat . size ;
223
223
} catch ( error ) {
@@ -228,8 +228,7 @@ const beforeUpload = async (filePath) => {
228
228
logger . error ( error . stack ) ;
229
229
console . log ( chalk . red ( ( error . response && error . response . data ) || error . message ) ) ;
230
230
}
231
- process . exitCode = 1 ;
232
- return ;
231
+ process . exit ( 1 ) ;
233
232
}
234
233
await getFileMD5 ( filePath ) ;
235
234
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " coding-generic" ,
3
- "version" : " 1.2.5 " ,
3
+ "version" : " 1.2.6 " ,
4
4
"description" : " " ,
5
5
"main" : " index.js" ,
6
6
"bin" : {
You can’t perform that action at this time.
0 commit comments