Skip to content

Commit e65ee21

Browse files
committed
fixup! add config file path to message
1 parent a9265be commit e65ee21

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/sshConfig.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ Host afterconfig
283283
LogLevel: "ERROR",
284284
}),
285285
).rejects.toThrow(
286-
`Malformed config: Unterminated START CODER VSCODE dev.coder.com block: Each START block must have an END block.`,
286+
`Malformed config: ${sshFilePath} has an unterminated START CODER VSCODE dev.coder.com block. Each START block must have an END block.`,
287287
)
288288
})
289289

@@ -338,7 +338,7 @@ Host afterconfig
338338
LogLevel: "ERROR",
339339
}),
340340
).rejects.toThrow(
341-
`Malformed config: Unterminated START CODER VSCODE dev.coder.com block: Each START block must have an END block.`,
341+
`Malformed config: ${sshFilePath} has an unterminated START CODER VSCODE dev.coder.com block. Each START block must have an END block.`,
342342
)
343343
})
344344

@@ -388,7 +388,9 @@ Host afterconfig
388388
UserKnownHostsFile: "/dev/null",
389389
LogLevel: "ERROR",
390390
}),
391-
).rejects.toThrow(`Malformed config: Unterminated START CODER VSCODE block: Each START block must have an END block.`)
391+
).rejects.toThrow(
392+
`Malformed config: ${sshFilePath} has an unterminated START CODER VSCODE block. Each START block must have an END block.`,
393+
)
392394
})
393395

394396
it("throws an error if there are more than one sections with the same label", async () => {
@@ -437,7 +439,7 @@ Host afterconfig
437439
LogLevel: "ERROR",
438440
}),
439441
).rejects.toThrow(
440-
`Malformed config: ssh config has 2 START CODER VSCODE dev.coder.com sections, please remove all but one.`,
442+
`Malformed config: ${sshFilePath} has 2 START CODER VSCODE dev.coder.com sections. Please remove all but one.`,
441443
)
442444
})
443445

0 commit comments

Comments
 (0)