mirror of
https://github.com/phillipberndt/autorandr
synced 2024-12-17 20:05:01 +00:00
Process --help first, before executing predetect hook
This commit is contained in:
parent
6973ad25ee
commit
5a79c16e23
@ -853,6 +853,9 @@ def main(argv):
|
||||
file=sys.stderr)
|
||||
sys.exit(posix.EX_USAGE)
|
||||
|
||||
if "-h" in options or "--help" in options:
|
||||
exit_help()
|
||||
|
||||
# Batch mode
|
||||
if "--batch" in options:
|
||||
if ("DISPLAY" not in os.environ or not os.environ["DISPLAY"]) and os.getuid() == 0:
|
||||
@ -947,9 +950,6 @@ def main(argv):
|
||||
raise AutorandrException("Failed to remove profile '%s'" % (options["--remove"],), e)
|
||||
sys.exit(0)
|
||||
|
||||
if "-h" in options or "--help" in options:
|
||||
exit_help()
|
||||
|
||||
detected_profiles = find_profiles(config, profiles)
|
||||
load_profile = False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user