The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 20:30 UTC
test(server): the ACP registry's fake uv is a fixture file, not a generated string (#15484)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Yordis Prieto committed
Oct 4, 2026 at 00:52 UTC
f870c419fc21f7ee23c122e60fb94adb8bf73a40
2 files changed
+24
-26
apps/server/src/provider/acp/AcpRegistrySupport.test.ts
+2
-26
@@ -116,33 +116,9 @@ const makeFakeUvToolchain = Effect.fn("AcpRegistrySupport.test.makeFakeUvToolcha
116
const logPath = path.join(rootDirectory, "uv.log");
117
yield* fileSystem.makeDirectory(toolchainBin, { recursive: true });
118
yield* fileSystem.writeFileString(logPath, "");
119
- yield* fileSystem.writeFileString(
119
+ yield* fileSystem.copyFile(
120
+ yield* path.fromFileUrl(new URL("./testing/AcpRegistrySupport.uv.fixture.sh", import.meta.url)),
121
uvPath,
121
- [
122
- "#!/bin/sh",
123
- 'printf \'%s\\n\' "$*" >> "$FAKE_UV_LOG"',
124
- 'tool_bin="${UV_TOOL_BIN_DIR:-$FAKE_UV_BIN}"',
125
- 'executable="$tool_bin/fast-agent"',
126
- 'printf "tool-dir=%s bin-dir=%s\\n" "$UV_TOOL_DIR" "$UV_TOOL_BIN_DIR" >> "$FAKE_UV_LOG"',
127
- 'if [ "$1" = "tool" ] && [ "$2" = "dir" ] && [ "$3" = "--bin" ]; then',
128
- " printf '%s\\n' \"$tool_bin\"",
129
- " exit 0",
130
- "fi",
131
- 'if [ "$1" = "tool" ] && [ "$2" = "list" ]; then',
132
- ' if [ -x "$executable" ]; then',
133
- " printf 'fast-agent-acp v0.10.1\\n- fast-agent\\n'",
134
- " fi",
135
- " exit 0",
136
- "fi",
137
- 'if [ "$1" = "tool" ] && [ "$2" = "install" ] && [ "$3" = "--force" ]; then',
138
- ' mkdir -p "$tool_bin"',
139
- " printf '#!/bin/sh\\n' > \"$executable\"",
140
- ' chmod 755 "$executable"',
141
- " exit 0",
142
- "fi",
143
- "exit 64",
144
- "",
145
- ].join("\n"),
122
);
123
yield* fileSystem.chmod(uvPath, 0o755);
124
return {
apps/server/src/provider/acp/testing/AcpRegistrySupport.uv.fixture.sh
new
+22
@@ -0,0 +1,22 @@
1
+#!/bin/sh
2
+printf '%s\n' "$*" >> "$FAKE_UV_LOG"
3
+tool_bin="${UV_TOOL_BIN_DIR:-$FAKE_UV_BIN}"
4
+executable="$tool_bin/fast-agent"
5
+printf "tool-dir=%s bin-dir=%s\n" "$UV_TOOL_DIR" "$UV_TOOL_BIN_DIR" >> "$FAKE_UV_LOG"
6
+if [ "$1" = "tool" ] && [ "$2" = "dir" ] && [ "$3" = "--bin" ]; then
7
+ printf '%s\n' "$tool_bin"
8
+ exit 0
9
+fi
10
+if [ "$1" = "tool" ] && [ "$2" = "list" ]; then
11
+ if [ -x "$executable" ]; then
12
+ printf 'fast-agent-acp v0.10.1\n- fast-agent\n'
13
+ fi
14
+ exit 0
15
+fi
16
+if [ "$1" = "tool" ] && [ "$2" = "install" ] && [ "$3" = "--force" ]; then
17
+ mkdir -p "$tool_bin"
18
+ printf '#!/bin/sh\n' > "$executable"
19
+ chmod 755 "$executable"
20
+ exit 0
21
+fi
22
+exit 64