From 360da39e15b5f2e8122e91710a577d69e9afbd6a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 7 Jan 2021 18:43:58 +0100 Subject: [PATCH] Improved regex to avoid matching timer/target services --- package_linter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package_linter.py b/package_linter.py index 7840fc1..e2ae6f7 100755 --- a/package_linter.py +++ b/package_linter.py @@ -1367,7 +1367,7 @@ class Script(TestSuite): @test() def raw_systemctl_start(self): - if self.containsregex(r'systemctl start [^. ]+(\.service)?'): + if self.containsregex(r'systemctl start \"?[^. ]+(\.service)?\"?\s'): yield Warning("Please do not use 'systemctl start' to start services. Instead, you should use ynh_systemd_action which will display the service log in case it fails to start. You can also use --line_match to wait until some specific word appear in the log, signaling the service indeed fully started.") @test()