Permalink
Browse files

Put a code on the 'need auth' error

  • Loading branch information...
1 parent 5316c02 commit 663dfdec9c7f0ec14b9469b7154a4650b122b9ff @isaacs isaacs committed Aug 17, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/publish.js
View
@@ -11,7 +11,9 @@ function publish (data, tarball, cb) {
var username = this.conf.get('username')
if (!email || !auth || !username) {
- return cb(new Error("auth and email required for publishing"))
+ var er = new Error("auth and email required for publishing")
+ er.code = 'ENEEDAUTH'
+ return cb(er)
}
// add the dist-url to the data, pointing at the tarball.

0 comments on commit 663dfde

Please sign in to comment.