Skip to content
This repository has been archived by the owner on May 8, 2018. It is now read-only.

Commit

Permalink
Merge branch 'master' into send_version
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Mar 29, 2016
2 parents 131216f + b011f2f commit f755d21
Show file tree
Hide file tree
Showing 6 changed files with 1,656 additions and 570 deletions.
4 changes: 2 additions & 2 deletions bin/nsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

'use strict';

var subcommand = require('subcommand');
var Subcommand = require('subcommand');
var usage = require('../lib/utils/usage.js')('root.txt');

var config = {
Expand All @@ -34,5 +34,5 @@ var config = {
}
};

var route = subcommand(config);
var route = Subcommand(config);
route(process.argv.slice(2));
5 changes: 3 additions & 2 deletions lib/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var ProxyAgent = require('https-proxy-agent');
var Semver = require('semver');
var Path = require('path');
var Wreck = require('wreck');
var pathIsAbsolute = require('path-is-absolute');
var PathIsAbsolute = require('path-is-absolute');

var Conf = require('rc')('nsp', {
api: {
Expand Down Expand Up @@ -68,6 +68,7 @@ module.exports = function (options, callback) {
}

options.proxy = options.proxy || Conf.proxy;
options.proxy = options.proxy || process.env.https_proxy || process.env.HTTPS_PROXY;
if (options.proxy) {
Conf.api.agent = new ProxyAgent(options.proxy);
delete options.proxy;
Expand Down Expand Up @@ -123,7 +124,7 @@ module.exports = function (options, callback) {
}
try {
if (advisoriesPath) {
if (!pathIsAbsolute(advisoriesPath)) {
if (!PathIsAbsolute(advisoriesPath)) {
advisoriesPath = Path.resolve(process.cwd(), advisoriesPath);
}

Expand Down
6 changes: 3 additions & 3 deletions lib/utils/usage.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use strict';

var fs = require('fs');
var path = require('path');
var Fs = require('fs');
var Path = require('path');

var usage = function (location) {

console.error(fs.readFileSync(path.join(__dirname, '../../', 'usage', location)).toString());
console.error(Fs.readFileSync(Path.join(__dirname, '../../', 'usage', location)).toString());
};

module.exports = function (location) {
Expand Down
Loading

0 comments on commit f755d21

Please sign in to comment.