Skip to content

Commit 608f116

Browse files
committed
back to normal
1 parent 7da0e3e commit 608f116

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

src/api.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Api } from "coder/site/src/api/api"
2-
import { ProvisionerJobLog, Workspace, WorkspaceStatus } from "coder/site/src/api/typesGenerated"
2+
import { ProvisionerJobLog, Workspace } from "coder/site/src/api/typesGenerated"
33
import fs from "fs/promises"
44
import { ProxyAgent } from "proxy-agent"
55
import * as vscode from "vscode"
@@ -117,16 +117,6 @@ export async function startWorkspace(restClient: Api, workspace: Workspace): Pro
117117
}
118118
}
119119

120-
/**
121-
* Get the status of a workspace
122-
* @param restClient Api
123-
* @param workspaceId string
124-
* @returns WorkspaceStatus
125-
*/
126-
export async function getWorkspaceStatus(restClient: Api, workspaceId: string): Promise<WorkspaceStatus> {
127-
return (await restClient.getWorkspace(workspaceId)).latest_build.status
128-
}
129-
130120
/**
131121
* Wait for the latest build to finish while streaming logs to the emitter.
132122
*

src/remote.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as path from "path"
1010
import prettyBytes from "pretty-bytes"
1111
import * as semver from "semver"
1212
import * as vscode from "vscode"
13-
import { getWorkspaceStatus, makeCoderSdk, startWorkspace, waitForBuild } from "./api"
13+
import { makeCoderSdk, startWorkspace, waitForBuild } from "./api"
1414
import { extractAgents } from "./api-helper"
1515
import * as cli from "./cliManager"
1616
import { Commands } from "./commands"
@@ -104,10 +104,8 @@ export class Remote {
104104
if (!(await this.confirmStart(workspaceName))) {
105105
return undefined
106106
}
107-
if (!["running", "starting"].includes(await getWorkspaceStatus(restClient, workspace.id))) {
108-
this.storage.writeToCoderOutputChannel(`Starting ${workspaceName}...`)
109-
workspace = await startWorkspace(restClient, workspace)
110-
}
107+
this.storage.writeToCoderOutputChannel(`Starting ${workspaceName}...`)
108+
workspace = await startWorkspace(restClient, workspace)
111109
break
112110
case "failed":
113111
// On a first attempt, we will try starting a failed workspace

0 commit comments

Comments
 (0)