This repository was archived by the owner on Jul 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -373,7 +373,7 @@ class InProcessExecutor implements Executor {
373
373
const evaluatorOptions = evaluator . options
374
374
375
375
// are we asked to redirect the output to a file?
376
- const redirectDesired = ! noCoreRedirect && ! ! pipeStages . redirect
376
+ let redirectDesired = ! noCoreRedirect && ! ! pipeStages . redirect
377
377
378
378
this . emitStartEvent ( {
379
379
tab,
@@ -465,6 +465,7 @@ class InProcessExecutor implements Executor {
465
465
if ( commands . length > 1 ) {
466
466
// e.g. "a ; b ; c"
467
467
response = await semicolonInvoke ( commands , execOptions )
468
+ redirectDesired = false // any redirects will be handled in the respective semi invoke
468
469
} else {
469
470
// e.g. just "a" or "a > /tmp/foo"
470
471
try {
@@ -763,14 +764,13 @@ async function redirectResponse<T extends KResponse>(
763
764
764
765
if ( response === true ) {
765
766
// probably a mis-parsing of the redirect
766
-
767
767
} else if ( Buffer . isBuffer ( response ) || typeof response === 'string' || isXtermResponse ( response ) ) {
768
768
try {
769
769
const data = isXtermResponse ( response ) ? response . rows . map ( i => i . map ( j => j . innerText ) ) . join ( ' ' ) : response
770
770
const writeOptions = redirector === '>>' ? '--append' : ''
771
771
await rexec < { data : string } > ( `vfs fwrite ${ encodeComponent ( expandHomeDir ( filepath ) ) } ${ writeOptions } ` , { data } )
772
772
773
- debug ( `redirected response to ${ filepath } ` )
773
+ debug ( `redirected response to ${ filepath } ` , response )
774
774
} catch ( err ) {
775
775
console . error ( err )
776
776
throw new Error ( `Error in redirect: ${ err . message } ` )
You can’t perform that action at this time.
0 commit comments