(format: LinuxPackageFormat, file: string)
| 361 | } |
| 362 | |
| 363 | export function elevatedInstallScript(format: LinuxPackageFormat, file: string): string | null { |
| 364 | const target = shellQuote(file) |
| 365 | switch (format) { |
| 366 | case 'deb': |
| 367 | // Install directly; if dependencies are missing, let apt resolve them. |
| 368 | return `dpkg -i ${target} || apt-get install -f -y` |
| 369 | case 'rpm': |
| 370 | return `rpm -U --force ${target}` |
| 371 | case 'pacman': |
| 372 | return `pacman -U --noconfirm ${target}` |
| 373 | default: |
| 374 | return null |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | export function manualInstallHint(format: LinuxPackageFormat, file: string): string { |
| 379 | switch (format) { |
no test coverage detected