deis / workflow-cli

The CLI for Deis Workflow
http://deis.com
MIT License
31 stars 43 forks source link

check if config comes from pipe and stat size is > 0 #306

Open pfeodrippe opened 7 years ago

pfeodrippe commented 7 years ago

Fixes #305

pfeodrippe commented 7 years ago

@Joshua-Anderson Ok, I'll test better this weekend o/. deis config:pull didn't give me any trouble, but I'll check on it too

pfeodrippe commented 7 years ago

@Joshua-Anderson You can see at this gist the test cli, it tests multiple cases for the deis config:push inputs.

You can download the dev deis binary zipped (it will be updated if needed) I've built for testing.

Maybe we could put these tests as part of the build tests (of course, changing the scripts accordingly for automation).

deis config:pull doesn't use stdin, so no need to modify it =)

pfeodrippe commented 7 years ago

And how could I give a default to docopt-go at the help doc and override it at code? Maybe it can say to us if the path came from the terminal or from the default value. You can see I'm using a hacked name for the path (.no-file)

codecov-io commented 7 years ago

Codecov Report

Merging #306 into master will decrease coverage by 0.24%. The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #306      +/-   ##
==========================================
- Coverage   72.71%   72.47%   -0.25%     
==========================================
  Files          59       59              
  Lines        4109     4193      +84     
==========================================
+ Hits         2988     3039      +51     
- Misses        793      821      +28     
- Partials      328      333       +5
Impacted Files Coverage Δ
cmd/cmd.go 66.66% <ø> (ø) :arrow_up:
cmd/config.go 48.97% <0%> (+5.07%) :arrow_up:
parser/config.go 86.25% <100%> (+0.32%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7313b43...806f3ad. Read the comment docs.

pfeodrippe commented 7 years ago

Ok, man, no worries :) I'll try to work on it at the weekend. Let's check at the config:pull too o/

vdice commented 7 years ago

@pfeodrippe is work on this PR still in progress? The next release (v2.16) is currently scheduled for this week and would be great to get this fix in!

pfeodrippe commented 7 years ago

@vdice I'll have more time only after 2017-07-17, sorry =\, but I'll keep working at this PR, maybe it will enter at v2.17?

vdice commented 7 years ago

@pfeodrippe No problems; sounds great! 👍

mboersma commented 6 years ago

@pfeodrippe do you think this is something you can finish up in time for the September v2.18 release, or should we close this?

pfeodrippe commented 6 years ago

@mboersma ok, gonna work on it until the September version

Cryptophobia commented 6 years ago

Would you like to make this PR towards the fork of Deis - Hephy? Here is the link: https://github.com/teamhephy/workflow-cli