@@ -129,6 +129,7 @@ class CoderCLIManager(
129
129
val remoteBinaryURL: URL = settings.binSource(deploymentURL)
130
130
val localBinaryPath: Path = settings.binPath(deploymentURL, forceDownloadToData)
131
131
val coderConfigPath: Path = settings.dataDir(deploymentURL).resolve(" config" )
132
+ val coderLogPath: Path = settings.dataDir(deploymentURL).resolve(" logs" )
132
133
133
134
/* *
134
135
* Download the CLI from the deployment if necessary.
@@ -262,7 +263,10 @@ class CoderCLIManager(
262
263
" --stdio" ,
263
264
if (settings.disableAutostart && feats.disableAutostart) " --disable-autostart" else null ,
264
265
)
265
- val proxyArgs = baseArgs + listOfNotNull(if (feats.reportWorkspaceUsage) " --usage-app=jetbrains" else null )
266
+ val proxyArgs = baseArgs + listOfNotNull(
267
+ " --log-dir" ,
268
+ escape(coderLogPath.toString()),
269
+ if (feats.reportWorkspaceUsage) " --usage-app=jetbrains" else null )
266
270
val backgroundProxyArgs = baseArgs + listOfNotNull(if (feats.reportWorkspaceUsage) " --usage-app=disable" else null )
267
271
val extraConfig =
268
272
if (settings.sshConfigOptions.isNotBlank()) {
@@ -368,6 +372,8 @@ class CoderCLIManager(
368
372
if (contents != null ) {
369
373
settings.sshConfigPath.parent.toFile().mkdirs()
370
374
settings.sshConfigPath.toFile().writeText(contents)
375
+ // The Coder cli will *not* create the log directory.
376
+ coderLogPath.toFile().mkdirs()
371
377
}
372
378
}
373
379
@@ -453,7 +459,6 @@ class CoderCLIManager(
453
459
Features ()
454
460
} else {
455
461
Features (
456
- // Autostart with SSH was added in 2.5.0.
457
462
disableAutostart = version >= SemVer (2 , 5 , 0 ),
458
463
reportWorkspaceUsage = version >= SemVer (2 , 13 , 0 ),
459
464
)
0 commit comments