-
Notifications
You must be signed in to change notification settings - Fork 43
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
check if config comes from pipe and stat size is > 0 #306
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the fix!
These changes didn't quite work for me though 😢
test.sh:
deis config:push -p filename
$ ./test.sh < test
# read from pipe, not filename
However, you could switch the order of checks, checking if there is a filename defined before reading from Stdin, and that should solve the problem
Also, deis config:pull
uses very similar code, so it would be great if that was patched up too.
@Joshua-Anderson Ok, I'll test better this weekend o/. |
…'deis config:push -a app-name < deis-env'
@Joshua-Anderson You can see at this gist the 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).
|
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 Report
@@ 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
Continue to review full report at Codecov.
|
-p <path>, --path=<path> | ||
a path leading to an environment file [default: .env] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for giving you bad advice here about checking filepath first. I completely forgot about the .env
default. It would be nice if we didn't have to go down this route, as it feels a little hacky.
So much for the easy solution 😄. I guess we do need to find the correct Sdin mode. If I have some time I'll help you experiment with this this week.
As for similar code in config:pull, here it is. It uses Stout, which means that redirecting a bash scripts output would likely run into similar issues to this.
Thanks so much for working on this and I apologize again for giving you bad advice 😢!
Ok, man, no worries :) I'll try to work on it at the weekend. |
@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! |
@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? |
@pfeodrippe No problems; sounds great! 👍 |
@pfeodrippe do you think this is something you can finish up in time for the September v2.18 release, or should we close this? |
@mboersma ok, gonna work on it until the September version |
Would you like to make this PR towards the fork of Deis - Hephy? Here is the link: https://github.com/teamhephy/workflow-cli |
Fixes #305