archlinux / archinstall

Arch Linux installer - guided, templates etc.
GNU General Public License v3.0
5.82k stars 509 forks source link

`--help` should not require sudo #2553

Open FelixFourcolor opened 1 week ago

FelixFourcolor commented 1 week ago

I don't think simply printing the help page should require root privilege. Or am I missing something?

How to reproduce

Run archinstall --help as a normal user.

Expected behavior

usage: archinstall [-h] [-v] [--config [CONFIG]] [--creds [CREDS]] [--silent] [--dry-run] [--script [SCRIPT]] [--mount-point [MOUNT_POINT]] [--skip-ntp] [--debug] [--offline]
                   [--no-pkg-lookups] [--plugin [PLUGIN]] [--skip-version-check]

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --config [CONFIG]     JSON configuration file or URL
  --creds [CREDS]       JSON credentials configuration file
  --silent              WARNING: Disables all prompts for input and confirmation. If no configuration is provided, this is ignored
  --dry-run, --dry_run  Generates a configuration file and then exits instead of performing an installation
  --script [SCRIPT]     Script to run for installation
  --mount-point [MOUNT_POINT], --mount_point [MOUNT_POINT]
                        Define an alternate mount point for installation
  --skip-ntp            Disables NTP checks during installation
  --debug               Adds debug info into the log
  --offline             Disabled online upstream services such as package search and key-ring auto update.
  --no-pkg-lookups      Disabled package validation specifically prior to starting installation.
  --plugin [PLUGIN]
  --skip-version-check  Skip the version check when running archinstall

Actual behavior

Not enough permission to place log file at /var/log/archinstall/install.log, creating it in /home/felix/install.log instead
Archinstall requires root privileges to run. See --help for more.
svartkanin commented 1 week ago

That's probably fair and should be an easy fix