mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-16 08:04:26 -04:00
properly detect sudo UID
This commit is contained in:
parent
31c66a1068
commit
1b7aca130b
2 changed files with 7 additions and 5 deletions
|
@ -596,8 +596,8 @@ def setup_django(out_dir: Path | None=None, check_db=False, config: benedict=CON
|
|||
except Exception as e:
|
||||
bump_startup_progress_bar(advance=1000)
|
||||
|
||||
subcommand = sys.argv[1] if len(sys.argv) > 1 else 'unknown'
|
||||
if subcommand not in ('help', 'version', '--help', '--version'):
|
||||
is_using_meta_cmd = any(ignored_subcommand in sys.argv for ignored_subcommand in ('help', 'version', '--help', '--version'))
|
||||
if not is_using_meta_cmd:
|
||||
# show error message to user only if they're not running a meta command / just trying to get help
|
||||
STDERR.print()
|
||||
STDERR.print(Panel(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue