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

How to allow silent merging of empty yaml files #205

Closed
benosman opened this issue Jan 31, 2019 · 0 comments · Fixed by #222
Closed

How to allow silent merging of empty yaml files #205

benosman opened this issue Jan 31, 2019 · 0 comments · Fixed by #222

Comments

@benosman
Copy link

benosman commented Jan 31, 2019

Hello,

I'm looking to use yq to create a merged yaml file in my ci build process.

The combined yaml file will be made up of up to three different files, but there is a chance some of them may be empty, or even missing.

Currently when you pass in an empty yaml file yq returns the following error Asked to process document index 0 but there are only 0 document(s)

How is an elegant way to handle this situation in a bash script?

Ideally I'd like a yq flag that permits empty files to be silently ignored.

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 a pull request may close this issue.

1 participant