Skip to content

fix: install the build number if available #131

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

Merged
merged 2 commits into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- `Stop` action is now available for running workspaces that have an out of date template.
- outdated and stopped workspaces are now updated and started when handling URI
- show errors when the Toolbox is visible again after being minimized.
- URI handling now installs the exact build number if it is available for the workspace.

## 0.3.0 - 2025-06-10

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=0.3.0
version=0.3.1
group=com.coder.toolbox
name=coder-toolbox
Original file line number Diff line number Diff line change
Expand Up @@ -380,16 +380,16 @@ open class CoderProtocolHandler(
return null
}

val matchingBuildNumber = availableVersions.firstOrNull { it.contains(buildNumber) } != null
if (!matchingBuildNumber) {
val buildNumberIsNotAvailable = availableVersions.firstOrNull { it.contains(buildNumber) } == null
if (buildNumberIsNotAvailable) {
val selectedIde = availableVersions.maxOf { it }
context.logAndShowInfo(
"$productCode-$buildNumber not available",
"$productCode-$buildNumber is not available, we've selected the latest $selectedIde"
)
return selectedIde
}
return null
return "$productCode-$buildNumber"
}

private fun installJBClient(selectedIde: String, environmentId: String): Job = context.cs.launch {
Expand Down
Loading