mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Complain if 'yunohost service add' is not matched with a 'yunohost service remove'
This commit is contained in:
parent
171617cb8a
commit
657f30a94d
1 changed files with 8 additions and 0 deletions
|
@ -373,6 +373,14 @@ def check_helper_consistency(script):
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
if script["name"] == "install" and "yunohost service add" in script["raw"]:
|
||||||
|
try:
|
||||||
|
script2 = read_file_raw(os.path.dirname(script["path"]) + "/remove")
|
||||||
|
if "yunohost service remove" not in script2:
|
||||||
|
print_wrong("You used 'yunohost service add' in the install script, but not 'yunohost service remove' in the remove script.")
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def check_deprecated_practices(script):
|
def check_deprecated_practices(script):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue