File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
src/sessions/WebSocketSession Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -64,19 +64,25 @@ export class Commands {
6464 true
6565 ) ;
6666
67+ if ( shell . status === "ERROR" || shell . status === "KILLED" ) {
68+ throw new Error ( `Failed to create shell: ${ shell . buffer . join ( "\n" ) } ` ) ;
69+ }
70+
6771 const details = {
6872 type : "command" ,
6973 command,
7074 name : opts ?. name ,
7175 } ;
7276
73- // Only way for us to differentiate between a command and a terminal
74- this . pitcherClient . clients . shell . rename (
75- shell . shellId ,
76- // We embed some details in the name to properly show the command that was run
77- // , the name and that it is an actual command
78- JSON . stringify ( details )
79- ) ;
77+ if ( shell . status !== "FINISHED" ) {
78+ // Only way for us to differentiate between a command and a terminal
79+ this . pitcherClient . clients . shell . rename (
80+ shell . shellId ,
81+ // We embed some details in the name to properly show the command that was run
82+ // , the name and that it is an actual command
83+ JSON . stringify ( details )
84+ ) ;
85+ }
8086
8187 const cmd = new Command (
8288 this . pitcherClient ,
You can’t perform that action at this time.
0 commit comments