From eaa5ade7f3bce5bc74e11dd7e376e1e420b4d17c Mon Sep 17 00:00:00 2001 From: Matthew Harrison-Jones Date: Thu, 3 Mar 2016 09:45:50 +0000 Subject: [PATCH] New: Allow a server to be specified via an environment variable --- lib/cli.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/cli.js b/lib/cli.js index f742019..aaff4a2 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -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)