Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print error and exit if install script is run as root #696

Merged
merged 6 commits into from
Jun 20, 2021
Merged

Conversation

Itai-Nelken
Copy link
Contributor

#695
and should fix cases like #694

@Kirill2006183
Copy link

Kirill2006183 commented May 27, 2021

# 695
и должен исправить такие случаи, как # 694

The question is solved I had to download the program file sudo apt install file only and started me

@Kirill2006183
Copy link

# 695
и должен исправить такие случаи, как # 694

It starts with and without root without errors

@Botspot
Copy link
Owner

Botspot commented Jun 5, 2021

Perhaps this technique would be better? We need the script to detect sudo usage, as well as root usage.

@Itai-Nelken
Copy link
Contributor Author

It now uses -id -u, I tested and it does work: the error is printed when running with sudo and when running as the root user without sudo.

@Itai-Nelken
Copy link
Contributor Author

ready to merge in my opinion. what do you say @Botspot?

@Botspot Botspot merged commit 686e4e7 into master Jun 20, 2021
@Itai-Nelken Itai-Nelken deleted the patch-1 branch June 20, 2021 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants