(file: string, dest: string)
| 562 | } |
| 563 | |
| 564 | export async function extractFile(file: string, dest: string): Promise<void> { |
| 565 | if (file.endsWith('.tar.gz')) { |
| 566 | await tar.x({ |
| 567 | file, |
| 568 | cwd: dest, |
| 569 | }); |
| 570 | } else if (file.endsWith('.zip')) { |
| 571 | await extract(file, { dir: dest }); |
| 572 | } else { |
| 573 | throw new Error(`Unsupported file extension for extraction: ${file}`); |
| 574 | } |
| 575 | } |
no outgoing calls
no test coverage detected