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

Update user permission check for --help #2568

Merged
merged 8 commits into from
Jul 11, 2024

Conversation

itstrueitstrueitsrealitsreal
Copy link
Contributor

@itstrueitstrueitsrealitsreal itstrueitstrueitsrealitsreal commented Jul 10, 2024

PR Description:

Fixes #2553
This pull request updates the script to allow the --help command to run without requiring root privileges. The modification ensures that users can access the help message without elevated permissions, addressing the issue reported in #2553.
I chose not to change the occurrence of this warning when running archinstall --help in the code, as it would help users without root permissions to access the logfile more easily.

Not enough permission to place log file at {log_file}, creating it in {fallback_log_file} instead

Changes Made:

  • Updated the root check logic to bypass if --help or -h is present in the arguments.
  • Shifted define_arguments() to come before the check for root permissions so the entire list of commands are displayed.

Tests and Checks

  • I have tested the code and confirmed that archinstall --help displays the help message without requiring root privileges.
    image

@svartkanin
Copy link
Collaborator

Can you change the indentation back to what it was originally

archinstall/__init__.py Outdated Show resolved Hide resolved
@svartkanin
Copy link
Collaborator

The build pipeline is failing

@svartkanin svartkanin merged commit 0f1c8ab into archlinux:master Jul 11, 2024
6 checks passed
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.

--help should not require sudo
3 participants