Skip to content

Commit

Permalink
Don't try loading the config file when running --help
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelad committed Nov 16, 2024
1 parent dd371e3 commit 2635ba2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/music_snapshot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import dataclasses
import os
import sys
from datetime import date, datetime, time, timedelta, timezone
from pathlib import Path

Expand Down Expand Up @@ -83,6 +84,9 @@ def cli(ctx: click.Context) -> None:
You can then use those values in the `authorize` subcommand, which will also
save the underlying data on your disk.
"""
if "--help" in sys.argv[1:]:
return

if ctx.invoked_subcommand != "authorize":
try:
config = MusicSnapshotConfig.load_from_disk(MUSIC_SNAPSHOT_CONFIG_PATH)
Expand Down

0 comments on commit 2635ba2

Please sign in to comment.