Skip to content

[DO NOT MERGE] Toolbox refactor #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Fix not updating ssh on the first run
  • Loading branch information
code-asher committed Sep 18, 2024
commit dd50651b629ce5e8f41681aca61428801bbf67a2
6 changes: 4 additions & 2 deletions src/main/kotlin/com/coder/gateway/CoderRemoteProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ class CoderRemoteProvider(

// Reconfigure if a new environment is found.
// TODO@JB: Should we use the add/remove listeners instead?
val newEnvironments = lastEnvironments?.let { environments.subtract(it) }
if (newEnvironments?.isNotEmpty() == true) {
val newEnvironments = lastEnvironments
?.let { environments.subtract(it) }
?: environments
if (newEnvironments.isNotEmpty()) {
logger.info("Found new environment(s), reconfiguring CLI: {}", newEnvironments)
cli.configSsh(newEnvironments.map { it.name }.toSet())
}
Expand Down