Fix script path
This commit is contained in:
@@ -12,8 +12,7 @@ function Get-RepoRoot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Fall back to script location for non-git repos
|
# Fall back to script location for non-git repos
|
||||||
$scriptDir = Split-Path -Parent $PSScriptRoot
|
return (Resolve-Path (Join-Path $PSScriptRoot "../..")).Path
|
||||||
return (Resolve-Path (Join-Path $scriptDir "..")).Path
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-CurrentBranch {
|
function Get-CurrentBranch {
|
||||||
|
|||||||
@@ -17,8 +17,7 @@ $featureDesc = ($FeatureDescription -join ' ').Trim()
|
|||||||
# Resolve repository root. Prefer git information when available, but fall back
|
# Resolve repository root. Prefer git information when available, but fall back
|
||||||
# to the script location so the workflow still functions in repositories that
|
# to the script location so the workflow still functions in repositories that
|
||||||
# were initialised with --no-git.
|
# were initialised with --no-git.
|
||||||
$scriptDir = Split-Path -Parent $PSScriptRoot
|
$fallbackRoot = (Resolve-Path (Join-Path $PSScriptRoot "../..")).Path
|
||||||
$fallbackRoot = (Resolve-Path (Join-Path $scriptDir "..")).Path
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$repoRoot = git rev-parse --show-toplevel 2>$null
|
$repoRoot = git rev-parse --show-toplevel 2>$null
|
||||||
|
|||||||
Reference in New Issue
Block a user