(platform: NodeJS.Platform, npmArgs: string[])
| 855 | * `cmd.exe /d /s /c npm …` → works.) |
| 856 | */ |
| 857 | export function npmInvocation(platform: NodeJS.Platform, npmArgs: string[]): { cmd: string; args: string[] } { |
| 858 | if (platform === 'win32') { |
| 859 | return { cmd: 'cmd.exe', args: ['/d', '/s', '/c', ['npm', ...npmArgs].join(' ')] }; |
| 860 | } |
| 861 | return { cmd: 'npm', args: npmArgs }; |
| 862 | } |
| 863 | |
| 864 | function upgradeNpm( |
| 865 | method: Extract<InstallMethod, { kind: 'npm' }>, |
no test coverage detected