@@ -33,7 +33,7 @@ import com.jetbrains.gateway.ssh.DeployTargetOS.OSKind
3333import com.jetbrains.gateway.ssh.IdeStatus
3434import com.jetbrains.gateway.ssh.IdeWithStatus
3535import com.jetbrains.gateway.ssh.IntelliJPlatformProduct
36- import com.jetbrains.gateway.ssh.guessOs
36+ import com.jetbrains.gateway.ssh.SshCommandsExecutor
3737import kotlinx.coroutines.CoroutineScope
3838import kotlinx.coroutines.Dispatchers
3939import kotlinx.coroutines.cancel
@@ -116,11 +116,12 @@ class CoderLocateRemoteProjectStepView(private val disableNextAction: () -> Unit
116116 logger.info(" Retrieving available IDE's for ${selectedWorkspace.name} workspace..." )
117117 val workspaceOS = if (selectedWorkspace.agentOS != null && selectedWorkspace.agentArch != null ) withContext(Dispatchers .IO ) { toDeployedOS(selectedWorkspace.agentOS, selectedWorkspace.agentArch) } else withContext(Dispatchers .IO ) {
118118 try {
119- RemoteCredentialsHolder ().apply {
119+ val credentialsHolder = RemoteCredentialsHolder ().apply {
120120 setHost(" coder.${selectedWorkspace.name} " )
121121 userName = " coder"
122122 authType = AuthType .OPEN_SSH
123- }.guessOs
123+ }
124+ SshCommandsExecutor .Companion .create(credentialsHolder).guessOs()
124125 } catch (e: Exception ) {
125126 logger.error(" Could not resolve any IDE for workspace ${selectedWorkspace.name} . Reason: $e " )
126127 null
@@ -141,7 +142,7 @@ class CoderLocateRemoteProjectStepView(private val disableNextAction: () -> Unit
141142 IntelliJPlatformProduct .values()
142143 .filter { it.showInGateway }
143144 .flatMap { CachingProductsJsonWrapper .getAvailableIdes(it, workspaceOS) }
144- .map { ide -> IdeWithStatus (ide.product, ide.buildNumber, IdeStatus .DOWNLOAD , ide.downloadLink , ide.presentableVersion) }
145+ .map { ide -> IdeWithStatus (ide.product, ide.buildNumber, IdeStatus .DOWNLOAD , ide.download, null , ide.presentableVersion) }
145146 }
146147
147148 if (idesWithStatus.isEmpty()) {
@@ -187,7 +188,7 @@ class CoderLocateRemoteProjectStepView(private val disableNextAction: () -> Unit
187188 " project_path" to tfProject.text,
188189 " ide_product_code" to selectedIDE.product.productCode,
189190 " ide_build_number" to selectedIDE.buildNumber,
190- " ide_download_link" to selectedIDE.source ,
191+ " ide_download_link" to selectedIDE.download !! .toJson() ,
191192 " web_terminal_link" to " ${terminalLink.url} "
192193 )
193194 )
0 commit comments