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

Feature/empty config #3782

Merged
merged 5 commits into from
Oct 25, 2020
Merged

Feature/empty config #3782

merged 5 commits into from
Oct 25, 2020

Conversation

Sudo-kun
Copy link
Contributor

"beet config with empty configuration could show a message #3779"

I added an if-clause if the config output was empty and print a different output if it is.

@@ -1691,7 +1691,10 @@ def config_func(lib, opts, args):
# Dump configuration.
else:
config_out = config.dump(full=opts.defaults, redact=opts.redact)
print_(util.text_string(config_out))
if config_out != '{}\n':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe config_out.strip() != '{}' to avoid white-space sensitivity?

@@ -6,6 +6,7 @@ Changelog

New features:

* When config is printed with no available configuration a new message is printed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linking to the issue number here might be cool.

@sampsyo sampsyo merged commit f9f2328 into beetbox:master Oct 25, 2020
@sampsyo
Copy link
Member

sampsyo commented Oct 25, 2020

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants