@@ -163,7 +163,7 @@ func (dsc *DurableShellController) Start(ctx context.Context, blockMeta waveobj.
163163
164164 if jobId == "" {
165165 log .Printf ("block %q starting new durable shell\n " , dsc .BlockId )
166- newJobId , err := dsc .startNewJob (ctx , blockMeta , dsc .ConnName )
166+ newJobId , err := dsc .startNewJob (ctx , blockMeta , dsc .ConnName , rtOpts )
167167 if err != nil {
168168 return fmt .Errorf ("failed to start new job: %w" , err )
169169 }
@@ -218,11 +218,14 @@ func (dsc *DurableShellController) SendInput(inputUnion *BlockInputUnion) error
218218 return jobcontroller .SendInput (context .Background (), data )
219219}
220220
221- func (dsc * DurableShellController ) startNewJob (ctx context.Context , blockMeta waveobj.MetaMapType , connName string ) (string , error ) {
221+ func (dsc * DurableShellController ) startNewJob (ctx context.Context , blockMeta waveobj.MetaMapType , connName string , rtOpts * waveobj. RuntimeOpts ) (string , error ) {
222222 termSize := waveobj.TermSize {
223223 Rows : shellutil .DefaultTermRows ,
224224 Cols : shellutil .DefaultTermCols ,
225225 }
226+ if rtOpts != nil && rtOpts .TermSize .Rows > 0 && rtOpts .TermSize .Cols > 0 {
227+ termSize = rtOpts .TermSize
228+ }
226229 cmdStr := blockMeta .GetString (waveobj .MetaKey_Cmd , "" )
227230 cwd := blockMeta .GetString (waveobj .MetaKey_CmdCwd , "" )
228231 opts , err := remote .ParseOpts (connName )
0 commit comments