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

Add support for short YAML file extension #8

Merged
merged 1 commit into from Oct 24, 2021

Conversation

jnns
Copy link
Contributor

@jnns jnns commented Oct 23, 2021

When I tried out Slippers it didn't work initially because I had created a "components.yml" file instead of "components.yaml". I didn't see the system check message either because the log statements already moved it too far up the terminal.

I'm not sure what suffix is more widely used but, for example, Docker Compose refers its config as "docker-compose.yml" while suporting both file endings:

The Compose file is a YAML file defining services, networks and volumes. The default path for a Compose file is ./docker-compose.yml.

Tip: You can use either a .yml or .yaml extension for this file. They both work.

When I tried out Slippers it didn't work initially because
I had created a "components.yml" file instead of "components.yaml".
I didn't see the system check message either because the
log statements already moved it too far up the terminal.

I'm not sure what suffix is more widely used but, for example,
Docker Compose refers its config as "docker-compose.yml" while
suporting both file endings:

> The Compose file is a YAML file defining services, networks and
> volumes. The default path for a Compose file is ./docker-compose.yml.
>
> Tip: You can use either a .yml or .yaml extension for this file.
> They both work.
@mixxorz
Copy link
Owner

mixxorz commented Oct 23, 2021

Hi @jnns

Thanks for your contribution! This is definitely something we want.

This fixes #4.

The code looks good, but do you mind adding a test to check that both components.yaml and components.yml can be loaded? Thanks.

Copy link
Owner

@mixxorz mixxorz left a comment

Choose a reason for hiding this comment

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

Actually. Never mind. It feels like too much work to write a test for a thin wrapper around select_template.

Thanks for this! I'll merge it in.

@mixxorz mixxorz merged commit fd67e29 into mixxorz:main Oct 24, 2021
@mixxorz mixxorz mentioned this pull request Oct 24, 2021
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.

None yet

2 participants