* Create an error message for Windows users when bash is not available.
()
| 98 | * Create an error message for Windows users when bash is not available. |
| 99 | */ |
| 100 | function createWindowsBashNotFoundError(): Error { |
| 101 | return new Error( |
| 102 | `Bash is required but was not found on this Windows system. |
| 103 | |
| 104 | To fix this, you have several options: |
| 105 | |
| 106 | 1. Install Git for Windows (includes bash.exe): |
| 107 | Download from: https://git-scm.com/download/win |
| 108 | |
| 109 | 2. Use WSL (Windows Subsystem for Linux): |
| 110 | Run in PowerShell (Admin): wsl --install |
| 111 | Then run Codebuff inside WSL. |
| 112 | |
| 113 | 3. Set a custom bash path: |
| 114 | Set the CODEBUFF_GIT_BASH_PATH environment variable to your bash.exe location. |
| 115 | Example: set CODEBUFF_GIT_BASH_PATH=C:\\path\\to\\bash.exe`, |
| 116 | ) |
| 117 | } |
| 118 | |
| 119 | export function runTerminalCommand({ |
| 120 | command, |
no outgoing calls
no test coverage detected