Hosts: --replace should detect correct location of 'sudo', and check for OS

Created on 3 Mar 2018  路  12Comments  路  Source: StevenBlack/hosts

Using a hardcoded /usr/bin/sudo isn't ideal, as this may not be where a particular OS stores this. Instead it should be searched in the environment to find the correct location.

As well, on OpenBSD for example, 'sudo' has been replaced by doas. A check to confirm distro and act accordingly would be ideal.

In the meantime, you can just copy the host file manually after the script fails. 馃槄

help wanted pull request wanted

Most helpful comment

@funilrys fixed/resolved.

All 12 comments

Hello! Thank you for opening your first issue in this repo. It鈥檚 people like you who make these host files better!

Hello @MitchWeaver and welcome here!

There's a pending PR (#519) which is in wait for refactoring against continuous tests results so please be patient @FadeMind should fix that soon :wink:

Have a nice weekend.
Nissar

@funilrys This waiting for acceptance and consent and merge @StevenBlack

I using this on my custom setup and works like a charm. (But I don't know why really travis scream out 鈿狅笍

Regards

@FadeMind You have to fix the following.

./updateHostsFile.py:1055:44: E201 whitespace after '['
./updateHostsFile.py:1076:48: E201 whitespace after '['
./updateHostsFile.py:1076:80: E501 line too long (80 > 79 characters)
./updateHostsFile.py:1088:40: E201 whitespace after '['

Cheers

@funilrys fixed/resolved.

As #519 has been merged this can be closed @StevenBlack ... unless we still have to implement :

As well, on OpenBSD for example, sudo has been replaced by doas. A check to confirm distro and act accordingly would be ideal.

This is still to-do since we don't have the string doas anywhere in this repo yet...

Okay Steven, then a beautiful pull request needed and/or help wanted label may help future contributors to find something to contribute to. :+1:

Tiny fix, I have submitted the PR

Hey Steven @StevenBlack, this can be closed due to #525 :+1:

@StevenBlack ^

Thanks Nissar @funilrys. Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dhavalgoti24 picture dhavalgoti24  路  3Comments

bigdargon picture bigdargon  路  3Comments

The-Compiler picture The-Compiler  路  3Comments

beerisgood picture beerisgood  路  3Comments

catsmoke picture catsmoke  路  3Comments