Skip to content

Commit

Permalink
fix: upload cdn exit on partial fail
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerblue committed Apr 3, 2024
1 parent 3b608f1 commit cc08d13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tasks/upload-cdn.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ fastListFolder(localFolder, function(err, list) {
},
onFileFinish: function(err, data, options) {
console.log(options.Key + ' upload ' + (err ? 'failed' : 'success'));
if (err) {
// 有文件上传失败时不会进入到最终的回调 err,只能在此直接退出
process.exit(1);
}
},
},
function(err, data) {
Expand Down

0 comments on commit cc08d13

Please sign in to comment.