update windows pathing

This commit is contained in:
ParthSareen 2026-01-05 23:10:46 -08:00
parent cb72dbce93
commit 301b8547da
1 changed files with 5 additions and 0 deletions

View File

@ -284,6 +284,11 @@ func isCommandOutsideCwd(command string) bool {
continue continue
} }
// Treat POSIX-style absolute paths as outside cwd on all platforms.
if strings.HasPrefix(arg, "/") || strings.HasPrefix(arg, "\\") {
return true
}
// Check for absolute paths outside cwd // Check for absolute paths outside cwd
if filepath.IsAbs(arg) { if filepath.IsAbs(arg) {
absPath := filepath.Clean(arg) absPath := filepath.Clean(arg)