mirror of
https://github.com/anthropics/claude-code.git
synced 2025-10-19 03:17:50 +03:00
Merge pull request #3678 from suwakei/fix/script
fix: Add check to run_devcontainer_claude_code.ps1 for the presence of required command
This commit is contained in:
@@ -37,6 +37,21 @@ param(
|
||||
Write-Host "--- DevContainer Startup & Connection Script ---"
|
||||
Write-Host "Using backend: $($Backend)"
|
||||
|
||||
# --- Prerequisite Check ---
|
||||
Write-Host "Checking for required commands..."
|
||||
try {
|
||||
Get-Command $Backend -ErrorAction Stop | Out-Null
|
||||
Write-Host "- $($Backend) command found."
|
||||
Get-Command devcontainer -ErrorAction Stop | Out-Null
|
||||
Write-Host "- devcontainer command found."
|
||||
}
|
||||
catch {
|
||||
Write-Error "A required command is not installed or not in your PATH."
|
||||
Write-Error "Please ensure '$($_.Exception.Message.Split(':')[0])' and 'devcontainer' are installed and accessible."
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# --- Backend-Specific Initialization ---
|
||||
if ($Backend -eq 'podman') {
|
||||
Write-Host "--- Podman Backend Initialization ---"
|
||||
|
||||
Reference in New Issue
Block a user