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

Fix get command with Django #804

Merged
merged 1 commit into from Sep 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions dynaconf/cli.py
Expand Up @@ -43,6 +43,8 @@ def set_settings(ctx, instance=None):

settings = None

_echo_enabled = ctx.invoked_subcommand not in ["get", None]

if instance is not None:
if ctx.invoked_subcommand in ["init"]:
raise click.UsageError(
Expand All @@ -57,7 +59,7 @@ def set_settings(ctx, instance=None):

flask_app = ScriptInfo().load_app()
settings = FlaskDynaconf(flask_app, **flask_app.config).settings
click.echo(
_echo_enabled and click.echo(
click.style(
"Flask app detected", fg="white", bg="bright_black"
)
Expand All @@ -73,7 +75,7 @@ def set_settings(ctx, instance=None):
settings = LazySettings()

if settings is not None:
click.echo(
_echo_enabled and click.echo(
click.style(
"Django app detected", fg="white", bg="bright_black"
)
Expand Down