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).
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.
Passing
app.logger
to therun()
call inutils.ping_repo()
give's some insight on what's happening.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).