(command: string, error?: string)
| 1 | import { execSync } from 'child_process'; |
| 2 | |
| 3 | export function runCommand(command: string, error?: string) { |
| 4 | try { |
| 5 | return (execSync(command, { stdio: 'inherit' }) || '').toString().trim(); |
| 6 | } catch (err) { |
| 7 | console.error(error || `Error while running command: ${command}`); |
| 8 | throw err; |
| 9 | } |
| 10 | } |
no outgoing calls
no test coverage detected