Warn when using ynh_script_progression in _common.sh

This commit is contained in:
selfhoster1312 2023-01-08 19:28:55 +01:00
parent b67409e3a8
commit e8fbcf6b5c

View file

@ -2660,6 +2660,13 @@ class Script(TestSuite):
'In the context of backup and restore scripts, you should load _common.sh with "source ../settings/scripts/_common.sh"' 'In the context of backup and restore scripts, you should load _common.sh with "source ../settings/scripts/_common.sh"'
) )
@test(only=["_common.sh"])
def no_progress_in_common(self):
if self.contains("ynh_script_progression"):
yield Error(
"You should not use `ynh_script_progression` in _common.sh because it will not work."
)
def main(): def main():
if len(sys.argv) < 2: if len(sys.argv) < 2: