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):
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(
"You should not need to use 'sudo', the self is being run as root. "
"(If you need to run a command using a specific user, use 'ynh_exec_as')"
"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' (or 'sudo -u'))"
)
@test()
@ -1346,11 +1346,11 @@ class Script(TestSuite):
@test(only=["install"])
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(
"Please add a few messages for the user, to explain what is going on "
"(in friendly, not-too-technical terms) during the installation. "
"You can use 'ynh_print_info' or 'ynh_script_progression' for this."
"Please add a few messages for the user using 'ynh_script_progression' "
"to explain what is going on (in friendly, not-too-technical terms) "
"during the installation. (and ideally in scripts remove, upgrade and restore too)"
)
@test()