NiklasRosenstein / flux-ci

Flux is your own private & lightweight CI server.
MIT License
26 stars 10 forks source link

ping-repo doesn't work for me on Windows #47

Closed NiklasRosenstein closed 6 years ago

NiklasRosenstein commented 6 years ago

Passing app.logger to the run() call in utils.ping_repo() give's some insight on what's happening.

--------------------------------------------------------------------------------
INFO in utils [C:\Users\niklas\Repositories\NiklasRosenstein\flux\flux\utils.py:253]:
$ git ls-remote --exit-code https://github.com/nodepy/nodepy.git
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
ERROR in utils [C:\Users\niklas\Repositories\NiklasRosenstein\flux\flux\utils.py:261]:

fatal: unable to access 'https://github.com/nodepy/nodepy.git/': Could not resolve host: github.com

--------------------------------------------------------------------------------

I am still trying to find out where this issue comes from. It works when I run the command manually (although you get a list of all the refs in the repo, which you would't get if --exit-code is the last argument).

gsantner commented 6 years ago

20

NiklasRosenstein commented 6 years ago

At first I thought this issue was unrelated, but I found the source of the error. The env passed to flux.utils.run() is not merged into the current environment but is used as-is.