Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove references to auth view
  • Loading branch information
fioan89 committed Aug 8, 2022
commit 0cc56c69ee5e9b10573f33f23c3b1a8cc464c220
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class CoderWorkspacesStepView : CoderWorkspacesWizardStep, Disposable {
try {
coderClient.initClientSession(wizardModel.coderURL.toURL(), pastedToken)
} catch (e: AuthenticationResponseException) {
CoderAuthStepView.logger.error("Could not authenticate on ${wizardModel.coderURL}. Reason $e")
logger.error("Could not authenticate on ${wizardModel.coderURL}. Reason $e")
return
}
wizardModel.apply {
Expand All @@ -153,18 +153,18 @@ class CoderWorkspacesStepView : CoderWorkspacesWizardStep, Disposable {
if (getOS() != OS.WINDOWS) {
pi.fraction = 0.4
val chmodOutput = ProcessExecutor().command("chmod", "+x", cli.toAbsolutePath().toString()).readOutput(true).execute().outputUTF8()
CoderAuthStepView.logger.info("chmod +x ${cli.toAbsolutePath()} $chmodOutput")
logger.info("chmod +x ${cli.toAbsolutePath()} $chmodOutput")
}
pi.apply {
text = "Configuring coder cli..."
fraction = 0.5
}

val loginOutput = ProcessExecutor().command(cli.toAbsolutePath().toString(), "login", wizardModel.coderURL, "--token", wizardModel.token).readOutput(true).execute().outputUTF8()
CoderAuthStepView.logger.info("coder-cli login output: $loginOutput")
logger.info("coder-cli login output: $loginOutput")
pi.fraction = 0.8
val sshConfigOutput = ProcessExecutor().command(cli.toAbsolutePath().toString(), "config-ssh", "--yes", "--use-previous-options").readOutput(true).execute().outputUTF8()
CoderAuthStepView.logger.info("Result of `${cli.toAbsolutePath()} config-ssh --yes --use-previous-options`: $sshConfigOutput")
logger.info("Result of `${cli.toAbsolutePath()} config-ssh --yes --use-previous-options`: $sshConfigOutput")
pi.fraction = 1.0
}
}
Expand Down