Commit e3dc59bd63e1aee4cb776449e47d41f18b72b205
Fix bugs
cel committed on 8/30/2018, 3:21:23 AMParent: 125f39126d641932fa6ea0bf4af24df471f727c0
Files changed
bootstrap/bin.js | changed |
index.js | changed |
bootstrap/bin.js | ||
---|---|---|
@@ -34,14 +34,15 @@ | ||
34 | 34 … | return args.shift() |
35 | 35 … | } |
36 | 36 … | |
37 | 37 … | function version() { |
38 | - var pkg = require('./package') | |
38 … | + var pkg = require('../package') | |
39 | 39 … | console.log(pkg.name + ' ' + pkg.version) |
40 | 40 … | } |
41 | 41 … | |
42 | 42 … | function usage(code) { |
43 | - console.error(fs.readFileSync(path.join(__dirname, 'usage.txt'))) | |
43 … | + (code ? process.stderr : process.stdout) | |
44 … | + .write(fs.readFileSync(path.join(__dirname, 'usage.txt'), 'utf8')) | |
44 | 45 … | process.exit(code) |
45 | 46 … | } |
46 | 47 … | |
47 | 48 … | function main(args) { |
index.js | ||
---|---|---|
@@ -557,9 +557,9 @@ | ||
557 | 557 … | if (err) return cb(err) |
558 | 558 … | var version = distTags[spec] |
559 | 559 … | || semver.maxSatisfying(Object.keys(versions), spec) |
560 | 560 … | var item = versions[version] |
561 | - if (!item) return cb(new Error('Version not found: ' + name + '@' + spec)) | |
561 … | + if (!item) return cb(new Error('Version not found: ' + pkgName + '@' + spec)) | |
562 | 562 … | self.getMsgIdForBlobMention(item.blobId, item.author, function (err, id) { |
563 | 563 … | if (err) return cb(err) |
564 | 564 … | item.msgId = id |
565 | 565 … | cb(null, item) |
Built with git-ssb-web