File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ export class CodeServer {
119
119
private async spawn ( ) : Promise < CodeServerProcess > {
120
120
// This will be used both as the workspace and data directory to ensure
121
121
// instances don't bleed into each other.
122
- const dir = await this . createWorkspace ( )
122
+ let dir = await this . createWorkspace ( )
123
123
124
124
return new Promise ( ( resolve , reject ) => {
125
125
const args = [
@@ -128,6 +128,8 @@ export class CodeServer {
128
128
path . join ( dir , "extensions" ) ,
129
129
"--auth" ,
130
130
"none" ,
131
+ // The last argument is the workspace to open.
132
+ ...( this . args . includes ( "--ignore-last-opened" ) ? [ ] : [ dir ] ) ,
131
133
...this . args ,
132
134
// Using port zero will spawn on a random port.
133
135
"--bind-addr" ,
@@ -139,8 +141,6 @@ export class CodeServer {
139
141
path . join ( dir , "config.yaml" ) ,
140
142
"--user-data-dir" ,
141
143
dir ,
142
- // The last argument is the workspace to open.
143
- dir ,
144
144
]
145
145
this . logger . debug ( "spawning `node " + args . join ( " " ) + "`" )
146
146
const proc = cp . spawn ( "node" , args , {
You can’t perform that action at this time.
0 commit comments