(command: string)
| 53 | } |
| 54 | |
| 55 | export async function executeCommand(command: string): Promise<{success: boolean, message: string}> { |
| 56 | try { |
| 57 | const { stdout, stderr } = await execAsync(command); |
| 58 | if (stderr && !stdout) { |
| 59 | return { success: false, message: stderr }; |
| 60 | } |
| 61 | return { success: true, message: stdout }; |
| 62 | } catch (error) { |
| 63 | const errorMessage = error instanceof Error ? error.message : String(error); |
| 64 | return { success: false, message: errorMessage }; |
| 65 | } |
| 66 | } |
no outgoing calls
no test coverage detected