Skip to content

Commit

Permalink
Fix setup requiring token with mTLS
Browse files Browse the repository at this point in the history
  • Loading branch information
code-asher committed Oct 31, 2024
1 parent 4c7076f commit a348b20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as path from "path"
import prettyBytes from "pretty-bytes"
import * as semver from "semver"
import * as vscode from "vscode"
import { makeCoderSdk, startWorkspaceIfStoppedOrFailed, waitForBuild } from "./api"
import { makeCoderSdk, needToken, startWorkspaceIfStoppedOrFailed, waitForBuild } from "./api"
import { extractAgents } from "./api-helper"
import * as cli from "./cliManager"
import { Commands } from "./commands"
Expand Down Expand Up @@ -160,7 +160,7 @@ export class Remote {
const { url: baseUrlRaw, token } = await this.storage.readCliConfig(parts.label)

// It could be that the cli config was deleted. If so, ask for the url.
if (!baseUrlRaw || !token) {
if (!baseUrlRaw || (!token && needToken())) {
const result = await this.vscodeProposed.window.showInformationMessage(
"You are not logged in...",
{
Expand Down

0 comments on commit a348b20

Please sign in to comment.