surshar / claude-code
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
Built by Anthropic · github.com/anthropics
| @@ -40,14 +40,18 @@ | ||
| 40 | 40 | # --- Prerequisite Check --- |
| 41 | 41 | Write-Host "Checking for required commands..." |
| 42 | 42 | try { |
| 43 | - Get-Command $Backend -ErrorAction Stop | Out-Null | |
| 43 | + if (-not (Get-Command $Backend -ErrorAction SilentlyContinue)) { | |
| 44 | + throw "Required command '$($Backend)' not found." | |
| 45 | + } | |
| 44 | 46 | Write-Host "- $($Backend) command found." |
| 45 | - Get-Command devcontainer -ErrorAction Stop | Out-Null | |
| 47 | + if (-not (Get-Command devcontainer -ErrorAction SilentlyContinue)) { | |
| 48 | + throw "Required command 'devcontainer' not found." | |
| 49 | + } | |
| 46 | 50 | Write-Host "- devcontainer command found." |
| 47 | 51 | } |
| 48 | 52 | catch { |
| 49 | - Write-Error "A required command is not installed or not in your PATH." | |
| 50 | - Write-Error "Please ensure '$($_.Exception.Message.Split(':')[0])' and 'devcontainer' are installed and accessible." | |
| 53 | + Write-Error "A required command is not installed or not in your PATH. $($_.Exception.Message)" | |
| 54 | + Write-Error "Please ensure both '$Backend' and 'devcontainer' are installed and accessible in your system's PATH." | |
| 51 | 55 | exit 1 |
| 52 | 56 | } |
| 53 | 57 |