Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49336ca

Browse files
committed
fix: force CLI manager to use user settings
CLIManager can be created with default settings (simplifies testing),among which the ssh wildcard config is enabled. But in reality theconfig can be disabled by the user.
1 parent4f6482c commit49336ca

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

‎src/main/kotlin/com/coder/gateway/cli/CoderCLIManager.kt‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import com.coder.gateway.sdk.v2.models.User
1212
importcom.coder.gateway.sdk.v2.models.Workspace
1313
importcom.coder.gateway.sdk.v2.models.WorkspaceAgent
1414
importcom.coder.gateway.settings.CoderSettings
15-
importcom.coder.gateway.settings.CoderSettingsState
1615
importcom.coder.gateway.util.CoderHostnameVerifier
1716
importcom.coder.gateway.util.DialogUi
1817
importcom.coder.gateway.util.InvalidVersionException
@@ -129,7 +128,7 @@ class CoderCLIManager(
129128
// The URL of the deployment this CLI is for.
130129
privatevaldeploymentURL:URL,
131130
// Plugin configuration.
132-
privatevalsettings:CoderSettings =CoderSettings(CoderSettingsState()),
131+
privatevalsettings:CoderSettings,
133132
// If the binary directory is not writable, this can be used to force the
134133
// manager to download to the data directory instead.
135134
privatevalforceDownloadToData:Boolean =false,

‎src/main/kotlin/com/coder/gateway/views/steps/CoderWorkspaceProjectIDEStepView.kt‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class CoderWorkspaceProjectIDEStepView(
237237
IDECellRenderer(CoderGatewayBundle.message("gateway.connector.view.coder.connect-ssh"))
238238
}
239239
val executor= createRemoteExecutor(
240-
CoderCLIManager(data.client.url).getBackgroundHostName(
240+
CoderCLIManager(data.client.url, settings).getBackgroundHostName(
241241
data.workspace,
242242
data.client.me,
243243
data.agent
@@ -470,7 +470,11 @@ class CoderWorkspaceProjectIDEStepView(
470470
overridefundata():WorkspaceProjectIDE= withoutNull(cbIDE.selectedItem, state) { selectedIDE, state->
471471
selectedIDE.withWorkspaceProject(
472472
name=CoderCLIManager.getWorkspaceParts(state.workspace, state.agent),
473-
hostname=CoderCLIManager(state.client.url).getHostName(state.workspace, state.client.me, state.agent),
473+
hostname=CoderCLIManager(state.client.url, settings).getHostName(
474+
state.workspace,
475+
state.client.me,
476+
state.agent
477+
),
474478
projectPath= tfProject.text,
475479
deploymentURL= state.client.url,
476480
)

‎src/test/kotlin/com/coder/gateway/cli/CoderCLIManagerTest.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ internal class CoderCLIManagerTest {
106106
@Test
107107
funtestServerInternalError() {
108108
val (srv, url)= mockServer(HttpURLConnection.HTTP_INTERNAL_ERROR)
109-
val ccm=CoderCLIManager(url)
109+
val ccm=CoderCLIManager(url,CoderSettings(CoderSettingsState()))
110110

111111
val ex=
112112
assertFailsWith(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp