Zenika-Training / zenika-formation-framework

Tools to build and present our training material
8 stars 25 forks source link

tty missing when using docker + git bash (win10) #223

Closed gdrouet closed 6 years ago

gdrouet commented 6 years ago

Dans le run.sh du repository Formation--Modele, je suis obligé de remplacer les commandes docker ... par winpty docker ... afin que cela fonctionne. Environnement : Win10 et Git Bash. Commande jouée : ./run.sh clean pdf Le README indique pourtant que cela devrait fonctionner avec Git Bash

hgwood commented 6 years ago

Hi @gdrouet. You say that you have to replace docker by winpty docker. Could you expand on why that is? What is the problem that you encounter when running run.sh verbatim?

gdrouet commented 6 years ago

It says the input device is not a TTY. Adding winpty to the executed commands fix the issue. I'm not a TTY guru but I would expect that Git Bash is actually a TTY...

hgwood commented 6 years ago

OK. What happens if you try to run a framework container manually without run.sh? Does it work?

looztra commented 6 years ago

generatePdf() and the new generatePdfForLabs() run the docker container with the -it flags that generate this error with git bash (that does not seem to allocated a tty by default).

After a second though on this, I'm not sure generatePdf() really need the -it, we could check that first maybe :)

looztra commented 6 years ago

I changed the title of the issue as it is a "tty" issue (and there is another issue not related to tty, see #224 )

looztra commented 6 years ago

fix proposed in https://github.com/Zenika/Formation--Modele/pull/132

hgwood commented 6 years ago

I use git bash and I've never had any problem with -it. But anyway if those flags aren't needed then they should be removed I guess.

looztra commented 6 years ago

@gdrouet could you please test with the latest version?

Don't forget to have a look at the updated doc for windows: https://github.com/Zenika/Formation--Modele#windows regarding the env var MSYS_NO_PATHCONV

gdrouet commented 6 years ago

@looztra it works perfectly thanks

gdrouet commented 6 years ago

Closing the issue since commit https://github.com/Zenika/Formation--Modele/pull/132/commits/fa685185be6e6d2f4c0401cc0e2d301e037fda6a has fixed it.