• Cristian Maglie's avatar
    Always redirect stdin to null (fix tools tty detection, in particular avrdude... · 1785314e
    Cristian Maglie authored
    Always redirect stdin to null (fix tools tty detection, in particular avrdude running in safe mode) (#897)
    
    Some tools detects if the program is running from terminal by looking at the stdin/out bindings.
    Previously stdin wasn't bound to any custom stream, this fact lead avrdude to think it was run from terminal (instead of a script) and start it in "safe-mode". This turn out to be a problem in some cases, see #844
    
    * Removed useless stdout/err listeners
    
    They are immediatly overwritten on the next line.
    
    * Always pipe stdout/err/in when running tools.
    
    This is required because some tools detects if the program is running
    from terminal by looking at the stdin/out bindings.
    
    Fix: https://github.com/arduino/arduino-cli/issues/844
    
    * Do not use NullWriter in executils by default.
    
    This is not strictly required for the 'avrdude' hack.
    1785314e
null.go 1.1 KB