mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
[enh] Improve sudo error display.
This commit is contained in:
parent
59274abbd7
commit
734ff54363
1 changed files with 2 additions and 1 deletions
|
@ -132,7 +132,8 @@ def check_sudo_prefix_commands(script):
|
||||||
and "yunohost service" not in script[i] and "-exec " + cmd[j] not in script[i] \
|
and "yunohost service" not in script[i] and "-exec " + cmd[j] not in script[i] \
|
||||||
and ".service" not in script[i] and script[i][0] != '#':
|
and ".service" not in script[i] and script[i][0] != '#':
|
||||||
print(c.FAIL + "✘ Line ", i + 1, "you should add \"sudo\" before this command line:", c.END)
|
print(c.FAIL + "✘ Line ", i + 1, "you should add \"sudo\" before this command line:", c.END)
|
||||||
print(script[i]); ok = 0
|
print(" " + script[i].replace(cmd[j], c.BOLD + c.FAIL + cmd[j] + c.END));
|
||||||
|
ok = 0
|
||||||
j+=1
|
j+=1
|
||||||
i+=1
|
i+=1
|
||||||
if ok == 1: print_right("All commands are prefix with \"sudo\".")
|
if ok == 1: print_right("All commands are prefix with \"sudo\".")
|
||||||
|
|
Loading…
Reference in a new issue