Skip to content

Commit 2271448

Browse files
committed
Cannot use destructure
1 parent 5809801 commit 2271448

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/commands.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,12 @@ export class Commands {
136136
* Log into the provided deployment. If the deployment URL is not specified,
137137
* ask for it first with a menu showing recent URLs and CODER_URL, if set.
138138
*/
139-
public async login([inputUrl, inputLabel, inputToken]: string[]): Promise<void> {
139+
public async login(...args: string[]): Promise<void> {
140+
// Destructure would be nice but VS Code can pass undefined which errors.
141+
const inputUrl = args[0]
142+
const inputToken = args[1]
143+
const inputLabel = args[2]
144+
140145
const url = await this.maybeAskUrl(inputUrl)
141146
if (!url) {
142147
return

0 commit comments

Comments
 (0)