Misc message tweaks

This commit is contained in:
Alexandre Aubin 2020-11-19 00:47:57 +01:00
parent ef8256372f
commit a682a34454

View file

@ -1326,8 +1326,8 @@ class Script(TestSuite):
def sudo(self): def sudo(self):
if self.containsregex(r"sudo \w"): # \w is here to not match sudo -u, legit use because ynh_exec_as not official yet... if self.containsregex(r"sudo \w"): # \w is here to not match sudo -u, legit use because ynh_exec_as not official yet...
yield Info( yield Info(
"You should not need to use 'sudo', the self is being run as root. " "You should not need to use 'sudo', the script is being run as root. "
"(If you need to run a command using a specific user, use 'ynh_exec_as')" "(If you need to run a command using a specific user, use 'ynh_exec_as' (or 'sudo -u'))"
) )
@test() @test()
@ -1346,11 +1346,11 @@ class Script(TestSuite):
@test(only=["install"]) @test(only=["install"])
def progression(self): def progression(self):
if not self.contains("ynh_print_info") and not self.contains("ynh_script_progression"): if not self.contains("ynh_script_progression"):
yield Warning( yield Warning(
"Please add a few messages for the user, to explain what is going on " "Please add a few messages for the user using 'ynh_script_progression' "
"(in friendly, not-too-technical terms) during the installation. " "to explain what is going on (in friendly, not-too-technical terms) "
"You can use 'ynh_print_info' or 'ynh_script_progression' for this." "during the installation. (and ideally in scripts remove, upgrade and restore too)"
) )
@test() @test()