spacehub

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

Merge pull request #3678 from suwakei/fix/scriptBrowse files
fix: Add check to run_devcontainer_claude_code.ps1 for the presence of required command
ant-kurt authored on Jul 28, 2025 · GitHub committed on Jul 28, 2025 parents 07b198b + 9285dfb · commit 21df74bb49e2
1 changed file+15 -0compared with 07b198b
MScript/run_devcontainer_claude_code.ps1
@@ -37,6 +37,21 @@
3737 Write-Host "--- DevContainer Startup & Connection Script ---"
3838 Write-Host "Using backend: $($Backend)"
3939
40+# --- Prerequisite Check ---
41+Write-Host "Checking for required commands..."
42+try {
43+ Get-Command $Backend -ErrorAction Stop | Out-Null
44+ Write-Host "- $($Backend) command found."
45+ Get-Command devcontainer -ErrorAction Stop | Out-Null
46+ Write-Host "- devcontainer command found."
47+}
48+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."
51+ exit 1
52+}
53+
54+
4055 # --- Backend-Specific Initialization ---
4156 if ($Backend -eq 'podman') {
4257 Write-Host "--- Podman Backend Initialization ---"