Yamlfixer hangs on Git bash

Looks like a bug in git bash for me. If yamlfixer hangs its probably because it tries to read input from stdin, and it only does this if :
- either
-is specified as a filename on the command line, which is not the case here - or
stdinis not a TTY, i.e.stdinis a pipe, which should not be the case here, unless git bash is broken.
@adriens : if pressing Ctrl+D cleanly interrupts yamlfixer's hanging, see case 2 above.
if pressing Ctrl+D cleanly interrupts yamlfixer's hanging, see case 2 above.
It does not interrupt, even not ^C
Strange... Could you launch again with --debug then ?

That's what I said : you shell is buggy. In the code there's this :
# Ensure we read from stdin in case it's redirected
if ("-" not in sys.argv[1:]) and not sys.stdin.isatty():
sys.argv.append("-")
This condition should not be met, but it is, hence there's probably a bug in your shell.
@adriens could you paste the result of this on your git bash shell :
jerome@OPT17844:~$ python3
Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.stdin.isatty()
True
>>>
I'll provide yo uthat this afternoon 👍

This sucks...
Sure 💩 💋
Big time !
Legendary 💣
@adriens Not a bug in yamlfixer for sure, please see https://github.com/git-for-windows/git/issues/2594
I'll keep this one open though, because there's a similar issue when run from a GitHub action and I'm working on this atm.
@adriens here's a workaround for you : https://jpcodeqa.com/q/37d31f92ab77ec9de6be7e217da60985
there's a similar issue when run from a GitHub action and I'm working on this atm.
in a way that's a good news you could reproduce it 🤞
@mbarre pour Dockerfile, les variables à positionner
cf ~/yamlfixer/blob/main/yamlfixer/__main__.py
and not os.environ.get("GITHUB_ACTIONS")
and not os.environ.get("CI"):
exposer les variables dans Dockerfile et les positionner à true
Yep, je viens d'ajouter GITHUB_ACTIONS, publication de l'image docker en cours
cf https://github.com/opt-nc/yamlfixer/blob/99420745922981c9a7403e22de88cddbcfd58f6f/yamlfixer/main.py#L48