@@ -323,10 +323,9 @@ export class SSHRuntime implements Runtime {
323323 wrapperParts . push ( cdCommandForSSH ( options . cwd ) ) ;
324324
325325 // Add environment variable exports (use shellQuote for parity with Local)
326- if ( options . env ) {
327- for ( const [ key , value ] of Object . entries ( options . env ) ) {
328- wrapperParts . push ( `export ${ key } =${ shellQuote ( value ) } ` ) ;
329- }
326+ const envVars = { ...options . env , ...NON_INTERACTIVE_ENV_VARS } ;
327+ for ( const [ key , value ] of Object . entries ( envVars ) ) {
328+ wrapperParts . push ( `export ${ key } =${ shellQuote ( value ) } ` ) ;
330329 }
331330
332331 // Add the actual script
@@ -335,12 +334,11 @@ export class SSHRuntime implements Runtime {
335334 const wrapperScript = wrapperParts . join ( " && " ) ;
336335
337336 // Use shared buildSpawnCommand for parity with Local
338- // Note: stdoutPathExpanded/stderrPathExpanded are already quoted by expandTildeForSSH
339- // so we pass them directly without the buildSpawnCommand quoting
337+ // Pass expanded paths so tilde is resolved (buildSpawnCommand quotes them)
340338 const spawnCommand = buildSpawnCommand ( {
341339 wrapperScript,
342- stdoutPath : stdoutPath , // Will be quoted by buildSpawnCommand
343- stderrPath : stderrPath , // Will be quoted by buildSpawnCommand
340+ stdoutPath : stdoutPathExpanded ,
341+ stderrPath : stderrPathExpanded ,
344342 niceness : options . niceness ,
345343 } ) ;
346344
0 commit comments