Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 2 additions & 26 deletions apps/server/src/provider/acp/AcpRegistrySupport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,33 +137,9 @@ const makeFakeUvToolchain = Effect.fn("AcpRegistrySupport.test.makeFakeUvToolcha
const logPath = path.join(rootDirectory, "uv.log");
yield* fileSystem.makeDirectory(toolchainBin, { recursive: true });
yield* fileSystem.writeFileString(logPath, "");
yield* fileSystem.writeFileString(
yield* fileSystem.copyFile(
yield* path.fromFileUrl(new URL("./testing/AcpRegistrySupport.uv.fixture.sh", import.meta.url)),
uvPath,
[
"#!/bin/sh",
'printf \'%s\\n\' "$*" >> "$FAKE_UV_LOG"',
'tool_bin="${UV_TOOL_BIN_DIR:-$FAKE_UV_BIN}"',
'executable="$tool_bin/fast-agent"',
'printf "tool-dir=%s bin-dir=%s\\n" "$UV_TOOL_DIR" "$UV_TOOL_BIN_DIR" >> "$FAKE_UV_LOG"',
'if [ "$1" = "tool" ] && [ "$2" = "dir" ] && [ "$3" = "--bin" ]; then',
" printf '%s\\n' \"$tool_bin\"",
" exit 0",
"fi",
'if [ "$1" = "tool" ] && [ "$2" = "list" ]; then',
' if [ -x "$executable" ]; then',
" printf 'fast-agent-acp v0.10.1\\n- fast-agent\\n'",
" fi",
" exit 0",
"fi",
'if [ "$1" = "tool" ] && [ "$2" = "install" ] && [ "$3" = "--force" ]; then',
' mkdir -p "$tool_bin"',
" printf '#!/bin/sh\\n' > \"$executable\"",
' chmod 755 "$executable"',
" exit 0",
"fi",
"exit 64",
"",
].join("\n"),
);
yield* fileSystem.chmod(uvPath, 0o755);
return {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
printf '%s\n' "$*" >> "$FAKE_UV_LOG"
tool_bin="${UV_TOOL_BIN_DIR:-$FAKE_UV_BIN}"
executable="$tool_bin/fast-agent"
printf "tool-dir=%s bin-dir=%s\n" "$UV_TOOL_DIR" "$UV_TOOL_BIN_DIR" >> "$FAKE_UV_LOG"
if [ "$1" = "tool" ] && [ "$2" = "dir" ] && [ "$3" = "--bin" ]; then
printf '%s\n' "$tool_bin"
exit 0
fi
if [ "$1" = "tool" ] && [ "$2" = "list" ]; then
if [ -x "$executable" ]; then
printf 'fast-agent-acp v0.10.1\n- fast-agent\n'
fi
exit 0
fi
if [ "$1" = "tool" ] && [ "$2" = "install" ] && [ "$3" = "--force" ]; then
mkdir -p "$tool_bin"
printf '#!/bin/sh\n' > "$executable"
chmod 755 "$executable"
exit 0
fi
exit 64
Loading