potiuk commented on issue #14813:
URL: https://github.com/apache/airflow/issues/14813#issuecomment-972693383


   Agree it's not easy, but I think it's just a matter of careful 
implementation (and making some compromises), rather than using yet another 
dependency.
   
   Isn't that the case that stderr is also sent to stdout in SubprocessHook 
@hterik ? I think someone (not me :) ) made a decision that in this case we do 
not care about the stderr/stdout difference (`see stderr=STDOUT`) line:
   
   ```
               self.sub_process = Popen(
                   command,
                   stdout=PIPE,
                   stderr=STDOUT,
                   cwd=cwd,
                   env=env if env or env == {} else os.environ,
                   preexec_fn=pre_exec,
               )
   
               self.log.info('Output:')
               line = ''
               for raw_line in iter(self.sub_process.stdout.readline, b''):
                   line = raw_line.decode(output_encoding).rstrip()
                   self.log.info("%s", line)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to