From dc9b4d371f5b9a11ccbd8006ff06968e9caef1ce Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Mon, 18 Jul 2016 20:50:58 -0400 Subject: [PATCH] Add support for a `registry` configuration field (#211) * Add support for a `registry` configuration field For those of us using a system-wide private registry, this helps by allowing hyperterm to bypass it when installing/updates plugins. * Use getDecoratedConfig() * registry -> npmRegistry * no message --- config-default.js | 2 ++ plugins.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/config-default.js b/config-default.js index fdf2f036..c13f9168 100644 --- a/config-default.js +++ b/config-default.js @@ -51,6 +51,8 @@ module.exports = { // the shell to run when spawning a new session (i.e. /usr/local/bin/fish) // if left empty, your system's login shell will be used by default shell: '' + + // for advanced config flags please refer to https://hyperterm.org/#cfg }, // a list of plugins to fetch and install from npm diff --git a/plugins.js b/plugins.js index 89e3dca5..3c2510b2 100644 --- a/plugins.js +++ b/plugins.js @@ -191,6 +191,8 @@ function toDependencies (plugins) { function install (fn) { shellEnv().then((env) => { + let registry = exports.getDecoratedConfig().npmRegistry; + if (registry) env.NPM_CONFIG_REGISTRY = registry; exec('npm prune && npm install --production', { cwd: path, env: env