From 6fd0fbd8a0347fd47cb7ee0064e0902a2f8a087c Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sat, 31 Jan 2015 12:47:11 -0800 Subject: config: ensure etc dir exists before writing to it When editing config, if the `globalconfig` directory doesn't exist, create it so that the editor doesn't explode when trying to edit a file in a nonexistent path. --- test/common-tap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/common-tap.js') diff --git a/test/common-tap.js b/test/common-tap.js index 7dcfc35cc..403670828 100644 --- a/test/common-tap.js +++ b/test/common-tap.js @@ -18,7 +18,7 @@ exports.npm = function (cmd, opts, cb) { cmd = [bin].concat(cmd) opts = opts || {} - opts.env = opts.env ? opts.env : process.env + opts.env = opts.env || process.env if (!opts.env.npm_config_cache) { opts.env.npm_config_cache = npm_config_cache } -- cgit v1.2.3