Complain about ynh_setup_source --keep used with absolute paths ...

This commit is contained in:
Alexandre Aubin 2022-08-15 18:23:42 +02:00
parent f990b5215e
commit 200fe99e1c

View file

@ -2093,6 +2093,12 @@ class Script(TestSuite):
if os.system(cmd) == 0:
yield Info("(Requires Yunohost 4.3) When using ynh_exec_*, please don't wrap your command between quotes (typically DONT write ynh_exec_warn_less 'foo --bar --baz')")
@test()
def ynh_setup_source_keep_with_absolute_path(self):
cmd = 'grep -q -IhEro "ynh_setup_source.*keep.*final_path" %s' % self.path
if os.system(cmd) == 0:
yield Info("The --keep option of ynh_setup_source expects relative paths, not absolute path ... you do not need to prefix everything with '$final_path' in the --keep arg ...")
@test()
def ynh_add_fpm_config_deprecated_package_option(self):
if self.containsregex(r'ynh_add_fpm_config .*package=.*'):