From: Michel Lind <salimma@fedoraproject.org>
This means either Git is not installed, or the test is being run from a
published tarball and not a Git checkout.
In either case, that means we don't want to report the build result
(many Linux distributions also build with network access disabled, so
reporting will fail anyway) - and we should exit with status code 0, as
this is not actually an error.
Good catch; thanks! I think until recently no one had ever tried to run
the test suite on a computer that didn't have git installed. But of
course this is the better move.
Applied and pushed.
Thanks! Yeah, the breaking changes happened between 1.5.0 and 1.5.1 -
prior to that the code accidentally worked in our build system as the
Git remote was predefined, and the one git operation was to determine
the branch -- that will fail, return nil, and nil is not 'main' so
everything else got skipped.
Oh, that's funny; I ran into a really similar situation just over the
weekend trying to package it for Debian, except the problem was not
finding the branch; the builder system didn't have git at all. I assumed
yours was the same.
Oh well; the fix is the same either way.
-Phil
While prior to my patch we now try to use the result of the first 'git'
operation assuming it was not nil.
Best regards,
-Phil
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
---
test/irc.lua | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/test/irc.lua b/test/irc.lua
index e065800..d001145 100644
--- a/test/irc.lua+++ b/test/irc.lua
@@ -3,6 +3,10 @@ local channel = os.getenv("IRC_CHANNEL")
local url = os.getenv("JOB_URL") or "???"
local remote = io.popen("git remote get-url origin"):read('*l')
+if remote == nil then+ -- no git / no git repo, this is not an upstream CI job+ os.exit(0)+endlocal is_origin = remote:find('~technomancy/fennel$') ~= nil
local branch = io.popen("git rev-parse --abbrev-ref HEAD"):read('*l')
--
2.45.2