File tree 3 files changed +12
-2
lines changed
3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 5
5
"description" : " Open any workspace with a single click." ,
6
6
"repository" : " https://github.com/coder/vscode-coder" ,
7
7
"preview" : true ,
8
- "version" : " 0.1.1 " ,
8
+ "version" : " 0.1.2 " ,
9
9
"engines" : {
10
10
"vscode" : " ^1.73.0"
11
11
},
Original file line number Diff line number Diff line change @@ -82,5 +82,13 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
82
82
return
83
83
}
84
84
const remote = new Remote ( vscodeProposed , storage , ctx . extensionMode )
85
- await remote . setup ( vscodeProposed . env . remoteAuthority )
85
+ try {
86
+ await remote . setup ( vscodeProposed . env . remoteAuthority )
87
+ } catch ( ex ) {
88
+ await vscodeProposed . window . showErrorMessage ( "Failed to open workspace" , {
89
+ detail : ex as string ,
90
+ modal : true ,
91
+ useCustom : true ,
92
+ } )
93
+ }
86
94
}
Original file line number Diff line number Diff line change 9
9
import { ProvisionerJobLog , Workspace , WorkspaceAgent } from "coder/site/src/api/typesGenerated"
10
10
import EventSource from "eventsource"
11
11
import find from "find-process"
12
+ import { ensureDir } from "fs-extra"
12
13
import * as fs from "fs/promises"
13
14
import * as jsonc from "jsonc-parser"
14
15
import * as os from "os"
@@ -409,6 +410,7 @@ export class Remote {
409
410
LogLevel : "ERROR" ,
410
411
} )
411
412
413
+ await ensureDir ( path . dirname ( sshConfigFile ) )
412
414
await fs . writeFile ( sshConfigFile , parsedConfig . toString ( ) )
413
415
}
414
416
You can’t perform that action at this time.
0 commit comments