mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Make sure wget is quiet
This commit is contained in:
parent
c1f2bfe536
commit
b00ef3d23c
1 changed files with 11 additions and 0 deletions
|
@ -1152,6 +1152,17 @@ class Script(TestSuite):
|
|||
message = "Please add --quiet to systemctl enable/disable commands to avoid unecessary warnings when the script runs"
|
||||
yield Warning(message) if self.name in ["_common.sh", "install"] else Info(message)
|
||||
|
||||
@test()
|
||||
def quiet_wget(self):
|
||||
|
||||
wget_cmds = [line
|
||||
for line in [' '.join(line) for line in self.lines]
|
||||
if re.search(r"^wget ", line)]
|
||||
|
||||
if any(" -q " not in cmd and "--quiet" not in cmd and "2>" not in cmd for cmd in wget_cmds):
|
||||
message = "Please redirect wget's stderr to stdout with 2>&1 to avoid unecessary warnings when the script runs (yes, wget is annoying and displays a warning even when things are going okay >_> ...)"
|
||||
yield Warning(message) if self.name in ["_common.sh", "install"] else Info(message)
|
||||
|
||||
@test(only=["install"])
|
||||
def argument_fetching(self):
|
||||
|
||||
|
|
Loading…
Reference in a new issue