(installDirectory: string, binName: string)
| 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 | } |