@@ -7,7 +7,6 @@ import (
77 _ "embed"
88 "fmt"
99 "html/template"
10− "os"
1110 "path/filepath"
1211 "runtime"
1312 "strings"
@@ -15,6 +14,7 @@ import (
1514
1615 "charm.land/fantasy"
1716 "github.com/charmbracelet/crush/internal/config"
17+ "github.com/charmbracelet/crush/internal/fsext"
1818 "github.com/charmbracelet/crush/internal/permission"
1919 "github.com/charmbracelet/crush/internal/shell"
2020)
@@ -431,12 +431,7 @@ func countLines(s string) int {
431431
432432func normalizeWorkingDir(path string) string {
433433 if runtime.GOOS == "windows" {
434− cwd, err := os.Getwd()
435− if err != nil {
436− cwd = "C:"
437− }
438− path = strings.ReplaceAll(path, filepath.VolumeName(cwd), "")
434+ path = strings.ReplaceAll(path, fsext.WindowsWorkingDirDrive(), "")
439435 }
440−
441436 return filepath.ToSlash(path)
442437}