38 lines
1.4 KiB
PowerShell
38 lines
1.4 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
param(
|
|
[switch]$Quick
|
|
)
|
|
|
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
$RepoRoot = Split-Path -Parent $ScriptDir
|
|
$CanonicalHome = if ($env:COPILOT_RESOURCES_HOME) { $env:COPILOT_RESOURCES_HOME } else { Join-Path $HOME '.copilot-resources' }
|
|
$CopilotHome = if ($env:COPILOT_HOME) { $env:COPILOT_HOME } else { Join-Path $HOME '.copilot' }
|
|
$VscodeUserDir = if ($env:VSCODE_USER_DIR) { $env:VSCODE_USER_DIR } else { Join-Path $env:APPDATA 'Code\User' }
|
|
|
|
function Assert-Path {
|
|
param(
|
|
[string]$Label,
|
|
[string]$Path
|
|
)
|
|
|
|
if (Test-Path -LiteralPath $Path) {
|
|
Write-Host "[ok] $Label: $Path"
|
|
} else {
|
|
throw "Missing $Label: $Path"
|
|
}
|
|
}
|
|
|
|
Assert-Path -Label 'repo root' -Path $RepoRoot
|
|
Assert-Path -Label 'canonical home' -Path $CanonicalHome
|
|
Assert-Path -Label 'skills link' -Path (Join-Path $CopilotHome 'skills')
|
|
Assert-Path -Label 'agents link' -Path (Join-Path $CopilotHome 'agents')
|
|
Assert-Path -Label 'instructions link' -Path (Join-Path $CopilotHome 'instructions')
|
|
Assert-Path -Label 'hooks link' -Path (Join-Path $CopilotHome 'hooks')
|
|
Assert-Path -Label 'prompts link' -Path (Join-Path $VscodeUserDir 'prompts')
|
|
|
|
if (-not $Quick) {
|
|
Assert-Path -Label 'VS Code settings template' -Path (Join-Path $RepoRoot 'config\vscode\settings.template.jsonc')
|
|
Assert-Path -Label 'CLI env template' -Path (Join-Path $RepoRoot 'config\copilot-cli\env.example.ps1')
|
|
}
|