diff --git a/scripts/lib/managed-extensions.py b/scripts/lib/managed-extensions.py index 277bc00..08dd261 100644 --- a/scripts/lib/managed-extensions.py +++ b/scripts/lib/managed-extensions.py @@ -83,6 +83,9 @@ def run_command(arguments, summary=False, home=None): if executable is None: raise ValueError(f'{arguments[0]} CLI is required to manage plugins.') environment = os.environ.copy() + # npm 12 defaults allow-remote to none, so Claude's install of an npm plugin source (a registry tarball URL) fails + # with EALLOWREMOTE. "root" is not enough there; "all" applies only to this child process, and a user value wins. + environment.setdefault('npm_config_allow_remote', 'all') if home is not None: environment.update(HOME=str(home), USERPROFILE=str(home), CODEX_HOME=str(home / '.codex'), CLAUDE_CONFIG_DIR=str(home / '.claude')) result = subprocess.run([executable, *arguments[1:]], stdin=subprocess.DEVNULL,