Skip to content

Commit

Permalink
New: Allow a server to be specified via an environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
matthojo committed Mar 3, 2016
1 parent 9b551dd commit eaa5ade
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,16 @@ var command = {
log.error('An API key for WebPageTest must be specified.')
return 1
}
// Set env variables as option
if (process.env.PERFLINT_KEY) opts.key = process.env.PERFLINT_KEY

if (!opts.URL && !opts.test) {
log.error('A URL or WebPageTest test ID must be specified.')
return 1
}

// Set env variables as option
if (process.env.PERFLINT_KEY) opts.key = process.env.PERFLINT_KEY
if (process.env.PERFLINT_SERVER) opts.server = process.env.PERFLINT_SERVER

var config
if (opts.config) {
config = command.getConfig(opts.config)
Expand Down

0 comments on commit eaa5ade

Please sign in to comment.