Skip to content

Commit

Permalink
Merge pull request #154 from YunoHost/Do-not-delete-logs-on-app-removal
Browse files Browse the repository at this point in the history
Do not delete logs on app removal
  • Loading branch information
alexAubin authored Jun 20, 2024
2 parents 5d2c46a + 3583ca1 commit 2ba3022
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions package_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3120,6 +3120,13 @@ def no_progress_in_common(self):
"You should not use `ynh_script_progression` in _common.sh because it will produce warnings when trying to install the application."
)

@test(only=["remove"])
def no_log_remove(self):
if self.containsregex("(ynh_secure_remove|ynh_safe_rm|rm).*(\/var\/log\/)"):
yield Warning(
"Do not delete logs on app removal, else they will be erased if the app upgrade fails. This is handled by the core."
)


def main():
if len(sys.argv) < 2:
Expand Down

0 comments on commit 2ba3022

Please sign in to comment.