nitaigao / gulp-s3

MIT License
101 stars 82 forks source link

Errors are undetectable #47

Closed toolness closed 7 years ago

toolness commented 9 years ago

Hey, I noticed in the code that errors appear to be logged but then nothing is done about them:

      client.putBuffer(file.contents, uploadPath, headers, function(err, res) {
        if (err || res.statusCode !== 200) {
          gutil.log(gutil.colors.red('[FAILED]', file.path + " -> " + uploadPath));
        } else {
          gutil.log(gutil.colors.green('[SUCCESS]', file.path + " -> " + uploadPath));
          res.resume();
        }
      });

It would be nice if an error event or something was emitted, so that gulp tasks could raise errors instead of having the process exit with status code 0 even though things went amiss.

tomdidom commented 9 years ago

+1

mpelzsherman commented 9 years ago

+1

christianhaller commented 9 years ago

+1

nicholascloud commented 8 years ago

+1

mfonda commented 8 years ago

+1

nitaigao commented 7 years ago

Fixed in: https://github.com/nitaigao/gulp-s3/commit/f3a46731b608b88588280ae23c0feefa080e2c3f

christianhaller commented 7 years ago

Thank you @nitaigao :)