feat: add native Windows hierarchy test harness

This commit is contained in:
2026-09-09 16:48:54 +00:00
parent 8985457d37
commit 409b64a2fb
30 changed files with 1033 additions and 44 deletions
+6 -2
View File
@@ -3,6 +3,7 @@ package config
import (
"fmt"
"os"
"path"
"path/filepath"
"runtime"
"strings"
@@ -21,10 +22,13 @@ func validateAbsolutePath(name, value string, platform Platform, allowEmpty bool
}
return cleanWindowsPath(value), nil
}
if !filepath.IsAbs(value) {
// Config parsing can validate an inactive Unix shell path while running on
// Windows. filepath follows the host OS, whereas the config field's stated
// platform is Unix, so use slash-path semantics here.
if !path.IsAbs(value) {
return "", fmt.Errorf("%s must be an absolute Unix path", name)
}
return filepath.Clean(value), nil
return path.Clean(value), nil
}
func isWindowsAbsolute(value string) bool {