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

Method removeWin32Link

sources/commands/Disable.ts:87–98  ·  view source on GitHub ↗
(installDirectory: string, binName: string)

Source from the content-addressed store, hash-verified

85 }
86
87 async removeWin32Link(installDirectory: string, binName: string) {
88 for (const ext of [``, `.ps1`, `.cmd`]) {
89 const file = path.join(installDirectory, `${binName}${ext}`);
90 try {
91 await fs.promises.unlink(file);
92 } catch (err) {
93 if ((err as NodeError).code !== `ENOENT`) {
94 throw err;
95 }
96 }
97 }
98 }
99}

Callers 1

executeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected