Skip to content

Commit 526ab91

Browse files
committed
Fix SSH runtime redundant cd detection tests
Updated tests to use absolute paths instead of tilde paths for SSH runtime, consistent with the requirement that SSH srcBaseDir must be absolute.
1 parent 0168452 commit 526ab91

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/services/tools/bash.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,12 +1174,12 @@ describe("SSH runtime redundant cd detection", () => {
11741174
}
11751175

11761176
it("should add educational note when command starts with cd", async () => {
1177-
const remoteCwd = "~/workspace/project/branch";
1177+
const remoteCwd = "/remote/workspace/project/branch";
11781178
using testEnv = createTestBashToolWithSSH(remoteCwd);
11791179
const tool = testEnv.tool;
11801180

11811181
const args: BashToolArgs = {
1182-
script: "cd ~/workspace/project/branch && echo test",
1182+
script: "cd /remote/workspace/project/branch && echo test",
11831183
timeout_secs: 5,
11841184
};
11851185

@@ -1194,7 +1194,7 @@ describe("SSH runtime redundant cd detection", () => {
11941194
});
11951195

11961196
it("should not add note when command does not start with cd", async () => {
1197-
const remoteCwd = "~/workspace/project/branch";
1197+
const remoteCwd = "/remote/workspace/project/branch";
11981198
using testEnv = createTestBashToolWithSSH(remoteCwd);
11991199
const tool = testEnv.tool;
12001200

0 commit comments

Comments
 (0)