diff --git a/lib/api.js b/lib/api.js index a66a12e..75373c2 100644 --- a/lib/api.js +++ b/lib/api.js @@ -26,7 +26,7 @@ const MAX_PARTS = 10000; function request (options, condition = isNetworkOrIdempotentRequestError) { const environment = config.getEnvironment(); - const account = options.account || config.get(`${environment}.defaults.account`); + const account = options.account || process.env.PHC_ACCOUNT || config.get(`${environment}.defaults.account`); if (!account) { throw new Error(`Account needs to be set with 'lo defaults' or specified with the -a option.`); } diff --git a/lo.js b/lo.js index bd64a09..56621b9 100755 --- a/lo.js +++ b/lo.js @@ -5,9 +5,6 @@ const chalk = require('chalk'); const debug = require('debug')('lo'); const yargs = require('yargs'); -// Needed because the cognito library tries to fetch the user-agent from the browser -global.navigator = () => null; - function handleError (msg, err) { debug(`%j`, msg); if (err && err.response) {