on main help sign in
test: try fix windows tests
commit3cf895f5f01a894e1da346006b8b11df51c99b8d authorKujtim Hoxha <kujtimii.h@gmail.com> dateFri 24 Oct 2025, 16:23 (1 year ago) parentd2e47bf
1 file changed+7−1
internal/agent/common_test.go+7−1
internal/agent/common_test.go+7−1
@@ -5,6 +5,7 @@ import (
55 "net/http"
66 "os"
77 "path/filepath"
8+ "strings"
89 "testing"
910 "time"
1011
@@ -154,10 +155,15 @@ func coderAgent(r *recorder.Recorder, env env, large, small fantasy.LanguageMode
154155 t, _ := time.Parse("1/2/2006", "1/1/2025")
155156 return t
156157 }
158+ path := filepath.ToSlash(env.workingDir)
159+ // try fixing windows
160+ if strings.Contains(path, ":") {
161+ path = strings.Split(path, ":")[1]
162+ }
157163 prompt, err := coderPrompt(
158164 prompt.WithTimeFunc(fixedTime),
159165 prompt.WithPlatform("linux"),
160− prompt.WithWorkingDir(filepath.ToSlash(env.workingDir)),
166+ prompt.WithWorkingDir(path),
161167 )
162168 if err != nil {
163169 return nil, err