mirror of
https://github.com/github/spec-kit.git
synced 2026-03-24 14:23:09 +00:00
fix: resolve common.sh/ps1 sourcing from extension scripts directory
Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/spec-kit/sessions/809a1dbf-1301-4312-b4d2-e18f9b3e8b2f
This commit is contained in:
committed by
GitHub
parent
4f83308540
commit
086421daf1
@@ -145,8 +145,22 @@ if (-not $fallbackRoot) {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Load common functions (includes Resolve-Template)
|
||||
. "$PSScriptRoot/common.ps1"
|
||||
# Load common functions (includes Resolve-Template).
|
||||
# Try the core scripts directory first (standard layout), then fall back
|
||||
# to the extension's sibling copy.
|
||||
if (Test-Path "$PSScriptRoot/common.ps1") {
|
||||
. "$PSScriptRoot/common.ps1"
|
||||
} else {
|
||||
# When running from an extension install (.specify/extensions/git/scripts/powershell/),
|
||||
# resolve common.ps1 from the project's core scripts directory.
|
||||
$extRepoRoot = (Resolve-Path (Join-Path $PSScriptRoot "../../../../..") -ErrorAction SilentlyContinue)
|
||||
$coreCommon = if ($extRepoRoot) { Join-Path $extRepoRoot "scripts/powershell/common.ps1" } else { "" }
|
||||
if ($coreCommon -and (Test-Path $coreCommon)) {
|
||||
. $coreCommon
|
||||
} elseif (Test-Path "$PSScriptRoot/git-common.ps1") {
|
||||
. "$PSScriptRoot/git-common.ps1"
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$repoRoot = git rev-parse --show-toplevel 2>$null
|
||||
|
||||
Reference in New Issue
Block a user