-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
When connecting to the remote we use the Coder version to determine which flags are supported, but we should get the local cli version instead because it does not necessarily match (if the user has downloads disabled and is using an old cli).
Instead of all this:
Lines 197 to 218 in b35779a
const buildInfo = await workspaceRestClient.getBuildInfo() | |
const parsedVersion = semver.parse(buildInfo.version) | |
// Server versions before v0.14.1 don't support the vscodessh command! | |
if ( | |
parsedVersion?.major === 0 && | |
parsedVersion?.minor <= 14 && | |
parsedVersion?.patch < 1 && | |
parsedVersion?.prerelease.length === 0 | |
) { | |
await this.vscodeProposed.window.showErrorMessage( | |
"Incompatible Server", | |
{ | |
detail: "Your Coder server is too old to support the Coder extension! Please upgrade to v0.14.1 or newer.", | |
modal: true, | |
useCustom: true, | |
}, | |
"Close Remote", | |
) | |
await this.closeRemote() | |
return | |
} | |
const hasCoderLogs = supportsCoderAgentLogDirFlag(parsedVersion) |
We could do something like supportsCoderAgentLogDirFlag(version(binPath))
where version
comes from cliManager.ts
, and make version
return a SemVer
.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers