MCPcopy Index your code
hub / github.com/nodejs/corepack / execute

Method execute

sources/commands/InstallGlobal.ts:42–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40 args = Option.Rest();
41
42 async execute() {
43 if (this.args.length === 0)
44 throw new UsageError(`No package managers specified`);
45
46 await Promise.all(this.args.map(arg => {
47 if (arg.endsWith(`.tgz`)) {
48 return this.installFromTarball(path.resolve(this.context.cwd, arg));
49 } else {
50 return this.installFromDescriptor(specUtils.parseSpec(arg, `CLI arguments`, {enforceExactVersion: false}));
51 }
52 }));
53 }
54
55 log(locator: Locator) {
56 if (this.cacheOnly) {

Callers

nothing calls this directly

Calls 2

installFromTarballMethod · 0.95
installFromDescriptorMethod · 0.95

Tested by

no test coverage detected