(err: any)
| 26 | } |
| 27 | |
| 28 | function isPermissionError(err: any): boolean { |
| 29 | const errorText = getErrorText(err); |
| 30 | return ( |
| 31 | err?.code === "EACCES" || |
| 32 | err?.code === "EPERM" || |
| 33 | errorText.includes("Operation not permitted") || |
| 34 | errorText.includes("Permission denied") || |
| 35 | errorText.includes("RTNETLINK answers: Operation not permitted") |
| 36 | ); |
| 37 | } |
| 38 | |
| 39 | function formatCommand(command: string, args: string[] = []): string { |
| 40 | return [command, ...args].join(" "); |
no test coverage detected