File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 33# --- Helpers ---------------------------------------------------------------
44
55function Get-RepoRoot {
6- # Multiple fallback methods for finding the repository root
6+ # Simple approach: try multiple methods to find the repo root
77 $candidates = @ ()
88
99 # Method 1: From PSScriptRoot (when running from .github/tests)
1010 if ($PSScriptRoot ) {
1111 $candidates += (Join-Path $PSScriptRoot ' ..\..' )
1212 }
1313
14- # Method 2: From PSCommandPath
15- if ($PSCommandPath ) {
16- $candidates += (Join-Path (Split-Path - Parent $PSCommandPath ) ' ..\..' )
17- }
18-
19- # Method 3: From current working directory
14+ # Method 2: From current working directory
2015 $candidates += $PWD
2116
22- # Method 4 : From GitHub Actions workspace
17+ # Method 3 : From GitHub Actions workspace
2318 if ($env: GITHUB_WORKSPACE ) {
2419 $candidates += $env: GITHUB_WORKSPACE
2520 }
2621
27- # Method 5 : Look for Scripts directory in current and parent directories
22+ # Method 4 : Look for Scripts directory in current and parent directories
2823 $currentDir = $PWD
2924 for ($i = 0 ; $i -lt 5 ; $i ++ ) {
3025 $candidates += $currentDir
@@ -69,6 +64,8 @@ function Test-Syntax([string]$path) {
6964 return ($errors.Count -eq 0 )
7065}
7166
67+ # --- Path Resolution with Debug Output -------------------------------------
68+
7269$RepoRoot = Get-RepoRoot
7370$ScriptsDir = Join-Path $RepoRoot ' Scripts'
7471
You can’t perform that action at this time.
0 commit comments