Skip to content

Commit

Permalink
gracefully handling error caused by symlinks in directories - npm/fst…
Browse files Browse the repository at this point in the history
…ream#16 fixes the underlying issue
  • Loading branch information
Chris Raynor committed Jun 5, 2014
1 parent 248bc07 commit e9d78e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ module.exports = {

reader.addIgnoreRules(ignoreRules);

reader.pipe(tar.Pack())
reader.on('error', function(err) {
console.log(chalk.red('READ ERROR') + ' - Could not read directory. Remove' +
' symbolic links / shortcuts and try again.');
process.exit(1);
}).pipe(tar.Pack())
.pipe(zlib.createGzip())
.pipe(writeStream);

Expand Down

0 comments on commit e9d78e5

Please sign in to comment.