YunoHost / package_linter

Linter for YunoHost applications packages
https://yunohost.org/#/packaging_apps
GNU Affero General Public License v3.0
17 stars 13 forks source link

Yep if script find sudo word #67

Closed Mickael-Martin closed 5 years ago

Mickael-Martin commented 5 years ago

Hi,

if self.contains("sudo"):
            print_warning(
                "[YEP-2.12] You should not need to use 'sudo', the script is being run as root. "
                "(If you need to run a command using a specific user, use 'ynh_exec_as')"
)

Match if I use sudoers directory for example. Sorry I have no time to purpose a patch this time.

kay0u commented 5 years ago

A simple: if self.contains("sudo "): should do the trick? But it's ugly.

Mickael-Martin commented 5 years ago

Yes. It works for me ! But too ugly ? (I don't know)

alexAubin commented 5 years ago

Imho that's good enough ¯\_(ツ)_/¯