File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/sessions/WebSocketSession Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,13 @@ export class Commands {
3939 } ) ;
4040 }
4141
42- async create ( command : string , opts ?: ShellRunOpts ) {
42+ async create ( command : string | string [ ] , opts ?: ShellRunOpts ) {
4343 const disposableStore = new DisposableStore ( ) ;
4444 const onOutput = new Emitter < string > ( ) ;
4545 disposableStore . add ( onOutput ) ;
4646
47+ command = Array . isArray ( command ) ? command . join ( " && " ) : command ;
48+
4749 const allEnv = Object . assign ( this . getEnv ( ) , opts ?. env ?? { } ) ;
4850
4951 // TODO: use a new shell API that natively supports cwd & env
@@ -78,10 +80,7 @@ export class Commands {
7880 }
7981
8082 async run ( command : string | string [ ] , opts ?: ShellRunOpts ) : Promise < string > {
81- const cmd = await this . create (
82- Array . isArray ( command ) ? command . join ( " && " ) : command ,
83- opts
84- ) ;
83+ const cmd = await this . create ( command , opts ) ;
8584
8685 return cmd . waitUntilComplete ( ) ;
8786 }
You can’t perform that action at this time.
0 commit comments