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

task: add check if install.sh was run with root privileges #3069

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update install.sh
Co-authored-by: Reinaldy Rafli <[email protected]>
  • Loading branch information
LvckyAPI and aldy505 committed May 26, 2024
commit 6504c580142e47f02a0a1277602bb3d079eaa181
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi
# Check if script was executed with root/sudo
if [ "$(id -u)" -ne 0 ]; then
if [ "$CI" != "true" ]; then
echo "You should be using sudo, are you sure you want to continue? [y/n]"
echo "It is recommended to run the script as the root user (by using sudo or as a direct root user) to avoid permission issues. Are you sure you want to continue? [y/n]"
read -r answer
if [ "$answer" != "${answer#[Yy]}" ] ;then
echo "Continuing without sudo. This might cause issues later on."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking of adding something along the lines of "You should know what you're doing as this might cause issues later on". But that might sound a bit demeaning for some people.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, into line 16?

Copy link
Collaborator

@aldy505 aldy505 May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but I don't think that's the proper wording 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to know what you're doing, because this could cause issues later on. ?

Expand Down
Loading