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

Allow merging a single file #333

Closed
charlax opened this issue Jan 24, 2020 · 3 comments
Closed

Allow merging a single file #333

charlax opened this issue Jan 24, 2020 · 3 comments

Comments

@charlax
Copy link

charlax commented Jan 24, 2020

Should yq allow merging a single file? I know it does not make any sense to merge a single file, but it does make scripting with yq a lot simpler if it accepts a single file as the merge command input.

% yq m --allow-empty .custom.yml | yq r - -j
10:40:44 main [ERRO] Must provide at least 2 yaml files
panic: attempted to parse unknown event: none [recovered]
	panic: attempted to parse unknown event: none

Otherwise, yq could include a --allow-single flag to accept this behavior.

Thoughts?

@mikefarah
Copy link
Owner

No strong opinion... anyone else looking for this feature?

@mikefarah
Copy link
Owner

Done in https://github.com/mikefarah/yq/releases/tag/3.1.0 (no extra flag required) :)

@charlax
Copy link
Author

charlax commented Feb 7, 2020

Wow thanks for the fast turnaround! This is great!

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

No branches or pull requests

2 participants