heroku-cli-util
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "heroku-cli-util", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Set of helpful CLI utilities", | ||
@@ -5,0 +5,0 @@ "main": "cli.js", |
@@ -1,2 +0,4 @@ | ||
function Process() {} | ||
function Process() { | ||
this.env = process.env; | ||
} | ||
Process.prototype.mock = function () { | ||
@@ -3,0 +5,0 @@ this.mocking = true; |
@@ -79,3 +79,8 @@ var util = require('util'); | ||
if (cmd.needsApp) { | ||
options.app = options.args.app; | ||
if (process.env.HEROKU_APP) { | ||
options.app = process.env.HEROKU_APP; | ||
} | ||
if (options.args.app) { | ||
options.app = options.args.app; | ||
} | ||
if (!options.app) { | ||
@@ -82,0 +87,0 @@ console.error(' ! No app specified.'); |
@@ -27,2 +27,17 @@ require('chai').should(); | ||
}); | ||
it('gets an app via env var', function () { | ||
process.env.HEROKU_APP = 'myappname'; | ||
var appName; | ||
var cmd = { | ||
topic: 'foo', | ||
name: 'bar', | ||
needsApp: true, | ||
run: function (context) { | ||
appName = context.app; | ||
} | ||
}; | ||
run([cmd], ['foo:bar']); | ||
appName.should.equal('myappname'); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5860
151
3