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

YAML variables shouldn't use dashes #255

Closed
ajdelgado opened this issue May 15, 2022 · 3 comments
Closed

YAML variables shouldn't use dashes #255

ajdelgado opened this issue May 15, 2022 · 3 comments
Labels
🪲 bug Something isn't working in-progress 🏃 I'm working on this right now server Relates to the main binary (server or client)

Comments

@ajdelgado
Copy link

Hi,
The YAML specification defines a dash as a special character and can't be used for variables. This makes the configuration file for ntfy not complaint causing first an issue to check correct syntax but in my case an issue creating an Ansible Role. what could be a simple YAML2YAML process needs translation to set the dashes.
I guess the easier solution for the community would be allowing defining with dashes or underscores for a while, and deprecating the dashes at some point.
Maybe this should be a new feature request, but it actually breaks tests.

@binwiederhier binwiederhier added 🪲 bug Something isn't working server Relates to the main binary (server or client) labels May 16, 2022
@binwiederhier
Copy link
Owner

Thank you for using ntfy and for reporting this. Well that's a bummer with the config options. I'm using the urfave/cli library and it does all the config loading for me. It's using the config options as CLI options and config file options, which is why _ are kind of ugly. Maybe I could just make it support both. Aliases are already supported by the library. Could be a super simple ticket.

In the meantime, you could probably use environment variables in Ansible, no?

@binwiederhier
Copy link
Owner

@binwiederhier binwiederhier added the in-progress 🏃 I'm working on this right now label May 16, 2022
@binwiederhier
Copy link
Owner

This is done in 91594fa and will be in the next release. Thank you for reporting @ajdelgado.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working in-progress 🏃 I'm working on this right now server Relates to the main binary (server or client)
Projects
None yet
Development

No branches or pull requests

2 participants