Skip to content

Commit

Permalink
Update: Improve code consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Nov 28, 2017
1 parent c51a906 commit bcf0a45
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/dest/writeContents/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,17 @@ function writeContents(writePath, file, cb) {
}

function isErrorFatal(err) {
var isFatal = true;
if (!err) {
isFatal = false;
} else if (err.code === 'EEXIST' && file.flag === 'wx') {
return false;
}

if (err.code === 'EEXIST' && file.flag === 'wx') {
// Handle scenario for file overwrite failures.
isFatal = false; // "These aren't the droids you're looking for"
return false; // "These aren't the droids you're looking for"
}

// Otherwise, this is a fatal error
return isFatal;
return true;
}
}

Expand Down

0 comments on commit bcf0a45

Please sign in to comment.