Files
coder/codersdk/toolsdk
Garrett Delfosse 7394a66e72 test(codersdk/toolsdk): fix TestTools/WorkspaceExecute workdir check on Windows (#32323)
Fixes CODAGT-1333.

`TestTools/WorkspaceExecute` failed on Windows with `GetFileAttributesEx
/tmp: The system cannot find the file specified.` The agent runs
commands via `sh -c` on every platform (`agent/agentproc/process.go`),
which is Git Bash/MSYS on Windows runners. There `pwd` prints a POSIX
path like `/tmp/...`, and `filepath.EvalSymlinks` cannot resolve it. The
command itself ran in the right directory; the assertion was wrong.

The test now runs `touch marker.txt` in the requested workdir and
asserts the file exists at `filepath.Join(workDir, "marker.txt")` on the
host. This is the same approach `agent/agentproc` `CustomWorkDir`
already uses for this reason. No timeouts changed.

---
_Generated by Coder Agents on behalf of @f0ssel._
2026-11-17 09:50:43 -05:00
..