In CoderCLIManager, we have a fallback behavior to download the CLI to the data-dir. We should log something somewhere to let folks know that this is happening.
|
// If downloads are enabled download the new version. |
|
if (settings.enableDownloads) { |
|
indicator?.invoke("Downloading Coder CLI...") |
|
try { |
|
cli.download() |
|
return cli |
|
} catch (e: java.nio.file.AccessDeniedException) { |
|
// Might be able to fall back to the data directory. |
|
val binPath = settings.binPath(deploymentURL) |
|
val dataDir = settings.dataDir(deploymentURL) |
|
if (binPath.parent == dataDir || !settings.enableBinaryDirectoryFallback) { |
|
throw e |
|
} |
|
} |
|
} |
|
|
|
// Try falling back to the data directory. |
|
val dataCLI = CoderCLIManager(deploymentURL, settings, true) |
|
val dataCLIMatches = dataCLI.matchesVersion(buildVersion) |
|
if (dataCLIMatches == true) { |
|
return dataCLI |
|
} |
In CoderCLIManager, we have a fallback behavior to download the CLI to the data-dir. We should log something somewhere to let folks know that this is happening.
jetbrains-coder/src/main/kotlin/com/coder/gateway/cli/CoderCLIManager.kt
Lines 78 to 99 in 5a4fb59