From 78b184228f63b8585d71673236d01daba7347a4d Mon Sep 17 00:00:00 2001 From: Jakob Haufe Date: Wed, 13 Nov 2024 20:57:55 +0100 Subject: [PATCH] Do not rely on systemd being in PATH systemd is not supposed to be in PATH (see e.g. [1]), so use systemd-nspawn instead to retrieve the version. [1] https://bugs.debian.org/913061 --- nspawn-runner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nspawn-runner b/nspawn-runner index c42d29d..01ea625 100755 --- a/nspawn-runner +++ b/nspawn-runner @@ -98,7 +98,7 @@ class NspawnRunner: self.root_dir = root_dir self.gitlab_build_dir = os.path.join(self.root_dir, ".build") self.gitlab_cache_dir = os.path.join(self.root_dir, ".cache") - res = subprocess.run(["systemd", "--version"], check=True, capture_output=True, text=True) + res = subprocess.run(["systemd-nspawn", "--version"], check=True, capture_output=True, text=True) self.systemd_version = int(res.stdout.splitlines()[0].split()[1]) @classmethod