Skip to content

Commit

Permalink
Merge pull request #46 from YunoHost/recommend-ynh-print-info
Browse files Browse the repository at this point in the history
Recommend ynh_print_info or ynh_script_progression usage in the install script
  • Loading branch information
alexAubin committed Feb 13, 2019
2 parents f8bbccd + b27a848 commit a4844e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package_linter.py
Expand Up @@ -432,6 +432,9 @@ def check_deprecated_practices(script):
if "systemctl restart nginx" in script["raw"] or "service nginx restart" in script["raw"]:
print_error("Restarting nginx is quite dangerous (especially for web installs) and should be avoided at all cost. Use 'reload' instead.")

if script["name"] == "install" and "ynh_print_info" not in script["shlex"] and "ynh_script_progression" not in script["shlex"]:
print_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.")

def main():
if len(sys.argv) != 2:
print("Give one app package path.")
Expand Down

0 comments on commit a4844e0

Please sign in to comment.