From d6c6e70933dbac082bdbf60b6c5d1ac0a72a40ad Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Tue, 13 Jun 2023 07:19:29 -0700 Subject: [PATCH] pmb.helpers.run_core: fix sudo timer when not using sudo pmb.config.sudo expects a list of commands + args, so when a string is passed (e.g. "true"), it results in pmb trying to execute the equivalent of "$ t r u e": (8/119) Installing linux-purism-librem5 (6.3.4-r0) doas: t: command not found doas: t: command not found doas: t: command not found doas: t: command not found Reviewed-by: Oliver Smith Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230613141929.15718-1-clayton@craftyguy.net%3E --- pmb/helpers/run_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmb/helpers/run_core.py b/pmb/helpers/run_core.py index 3cd5a5a2..10b22020 100644 --- a/pmb/helpers/run_core.py +++ b/pmb/helpers/run_core.py @@ -230,7 +230,7 @@ def sudo_timer_iterate(): if pmb.config.which_sudo() == "sudo": subprocess.Popen(["sudo", "-v"]).wait() else: - subprocess.Popen(pmb.config.sudo("true")).wait() + subprocess.Popen(pmb.config.sudo(["true"])).wait() timer = threading.Timer(interval=60, function=sudo_timer_iterate) timer.daemon = True