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

Optimize config loading messages #3092

Merged

Commits on Jan 2, 2023

  1. Optimize config loading messages

    As kinda discussed here dani-garcia#3090, the messages regarding loading the
    configuration files is a bit strange or unclear. There have been some
    other reports regarding this in the past, but wasn't that big a of a
    deal.
    
    But to make the whole process it bit more nice, this PR adjusts the way
    it reports issues and some small changes to the messages to make it all
    a bit more clear.
    
    - Do not report a missing `.env` file, but only send a message when using one.
    - Exit instead of Panic, a panic causes a stacktrace, which isn't needed
      here. I'm using a exit code 255 here so it is different to the other
      exit's we use.
    - Exit on more issues, since if we continue, it could cause
      configuration issues if the user thinks all is fine.
    - Use the actual env file used in the messages instead of `.env`.
    - Added a **INFO** message when loading the `config.json`.
      This makes it consistent with the info message for loading the env file.
    
    Resolves dani-garcia#3090
    BlackDex committed Jan 2, 2023
    Configuration menu
    Copy the full SHA
    5964dc9 View commit details
    Browse the repository at this point in the history