Skip to content

Commit 4419767

Browse files
only21milclaude
andcommitted
test(server): repository identity resolves a remote URL that contains a space
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent ed7f719 commit 4419767

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

‎apps/server/src/project/RepositoryIdentityResolver.test.ts‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,23 @@ it.layer(NodeServices.layer)("RepositoryIdentityResolverLive", (it) => {
9494
}).pipe(Effect.provide(RepositoryIdentityResolver.layer)),
9595
);
9696

97+
it.effect("resolves a remote whose URL contains a space", () =>
98+
Effect.gen(function* () {
99+
const fileSystem = yield* FileSystem.FileSystem;
100+
const cwd = yield* fileSystem.makeTempDirectoryScoped({
101+
prefix: "t3-repository-identity-spaced-remote-test-",
102+
});
103+
104+
yield* git(cwd, ["init"]);
105+
yield* git(cwd, ["remote", "add", "origin", "ssh://[email protected]/team repos/app.git"]);
106+
107+
const resolver = yield* RepositoryIdentityResolver.RepositoryIdentityResolver;
108+
const identity = yield* resolver.resolve(cwd);
109+
expect(identity?.locator.remoteName).toBe("origin");
110+
expect(identity?.locator.remoteUrl).toBe("ssh://[email protected]/team repos/app.git");
111+
}).pipe(Effect.provide(RepositoryIdentityResolver.layer)),
112+
);
113+
97114
it.effect("returns the git top-level root path when resolving from a nested workspace", () =>
98115
Effect.gen(function* () {
99116
const fileSystem = yield* FileSystem.FileSystem;

0 commit comments

Comments
 (0)