canonicalize temp paths in daemon/cli tests for macOS
Two tests compared a raw Directory.systemTemp path against an OS-resolved one, which diverge on macOS where /tmp is a symlink to /private/tmp: FilesService.atCwd resolves the CWD, and the clide-cli e2e server must hash the same canonical workspace the C client sees via getcwd. Resolve symlinks on both sides. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
da4bc267cb
commit
16583343cb
@@ -50,8 +50,10 @@ void main() {
|
||||
// Synthetic git workspace — the C client walks up looking for
|
||||
// `.git`, hashes whatever it lands on, and connects to the
|
||||
// matching socket. Match it by handing the same root to the
|
||||
// server.
|
||||
workspaceRoot = Directory.systemTemp.createTempSync('clide-ws-');
|
||||
// server. Canonicalise: the client resolves its CWD via the OS
|
||||
// (getcwd), so on macOS it hashes /private/tmp/… while a raw
|
||||
// createTemp path is /tmp/… — the two hashes must agree.
|
||||
workspaceRoot = Directory(Directory.systemTemp.createTempSync('clide-ws-').resolveSymbolicLinksSync());
|
||||
Directory('${workspaceRoot.path}/.git').createSync();
|
||||
dispatcher = DaemonDispatcher();
|
||||
registerArgvUnwrap(dispatcher);
|
||||
|
||||
Reference in New Issue
Block a user