Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.publish = function (system) {
var tarball = new BufferedStream();
//
// Helper function which pipes `tarball` to the `quill.systems` client.
// If tarball is a string, then a filestream will be created.
//
function uploadTarball(err) {
if (err) {
return tarball.emit('error', err);
}
tarball.emit('upload:start');
tarball.pipe(quill.systems.upload(system.name, system.version, function (err) {
return err
? tarball.emit('error', err)
: tarball.emit('upload:end');
}));