Fix some false-negative about exit usage + report it as error

This commit is contained in:
Alexandre Aubin 2020-10-08 16:40:04 +02:00
parent 01adf07c5e
commit cd396af50e

View file

@ -951,8 +951,8 @@ class Script(TestSuite):
@test()
def exit_ynhdie(self):
if self.contains("exit"):
yield Warning("'exit' command shouldn't be used. Please use 'ynh_die' instead.")
if self.contains(r"\bexit\b"):
yield Error("'exit' command shouldn't be used. Please use 'ynh_die' instead.")
@test()
def old_regenconf(self):