Skip to content

Commit 8c676c6

Browse files
authored
Fix FileAlreadyExistsException in case when ~/.ssh is a link to a directory (coder#345)
1 parent 75382f0 commit 8c676c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/com/coder/gateway/sdk/CoderCLIManager.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ class CoderCLIManager @JvmOverloads constructor(
302302
*/
303303
private fun writeSSHConfig(contents: String?) {
304304
if (contents != null) {
305-
Files.createDirectories(sshConfigPath.parent)
305+
sshConfigPath.parent.toFile().mkdirs()
306306
sshConfigPath.toFile().writeText(contents)
307307
}
308308
}

0 commit comments

Comments
 (0)