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

reading from stdin fails if - is explicitly given #311

Closed
thomasmitchell opened this issue Feb 26, 2020 · 0 comments · Fixed by #312
Closed

reading from stdin fails if - is explicitly given #311

thomasmitchell opened this issue Feb 26, 2020 · 0 comments · Fixed by #312

Comments

@thomasmitchell
Copy link
Contributor

It is attempting to parse STDIN twice. STDIN is empty the second time, however, so it errs early.

 ~/go_workspace/src/github.com/geofffranks/spruce → echo '{"foo": "bar"}' | spruce -DT merge -
DEBUG> Processing file '-'
DEBUG> $.foo: not found upstream, adding it
DEBUG> $.foo: replacing with new data (new data is neither map nor array)
-----> Current data after processing 'STDIN':
-----> foo: bar
----->
DEBUG> Processing file '-'
Error reading STDIN: no data found. Did you forget to pipe data to STDIN, or specify yaml files to merge?

Funnily enough, it looks like this was introduced in the fix to #306 , where we got no STDIN. Now we get two.

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