geofffranks / spruce

A BOSH template merge tool
MIT License
433 stars 78 forks source link

spruce merge don't support file name equal to '-' (STDIN) #306

Closed MMedini closed 5 years ago

MMedini commented 5 years ago
spruce merge -
Error reading file -: open -: no such file or directory

spruce merge -h
Error reading file -h: open -h: no such file or directory

Looks like spruce merge doesn't support this kind of operation, '-' for STDIN and '-h' for help I'm using spruce cli version v1.24.0

geofffranks commented 5 years ago

Sorry about that. Looks like it broke during a refactor in 1.24.0. Should be fixed tonight in 1.24.1

jhunt commented 4 years ago

This still seems broken for me in 1.25.1:

→  spruce --version
spruce - Version 1.25.1

→  cat foo.yml
test: foo

→  echo 'test: bar' | spruce merge foo.yml -
Error reading STDIN: no data found. Did you forget to pipe data to STDIN, or specify yaml files to merge?

It works in 1.23.0:

→  spruce --version
spruce - Version 1.23.0

→  cat foo.yml
test: foo

→  echo 'test: bar' | spruce merge foo.yml -
test: bar