Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Error message about host not existing is printed to stdout #962

Closed
bfirsh opened this issue Apr 6, 2015 · 5 comments
Closed

Error message about host not existing is printed to stdout #962

bfirsh opened this issue Apr 6, 2015 · 5 comments
Labels

Comments

@bfirsh
Copy link
Contributor

bfirsh commented Apr 6, 2015

The error message about the host not existing is printed to stdout, so this fails silently:

$ eval $(docker-machine env fdshkjlfsd)
$ 
@bfirsh bfirsh added the kind/bug label Apr 6, 2015
@dave-tucker
Copy link
Contributor

+1, it's not just the host not existing, but any error message
e.g FATA[0000] Unexpected error getting machine url: exit status 255
This happened to me today and I ended up running containers on the wrong docker host as I had assumed that the command had completed successfully :(

@ehazlett
Copy link
Contributor

@tianon is there anything we can do here with the eval? If machine exits non-zero would that cause the eval to show something?

@nathanleclaire
Copy link
Contributor

@bfirsh @dave-tucker @ehazlett This should now be fixed, and if things that need to "leak" their output from a subshell don't do so it's a bug. See: #1217 which cleans up the remaining thing we missed on this.

This was a huge reason we did the logging refactor: To clean up the granularity of what we print to STDOUT and STDERR.

Today on master I get:

$ eval $(docker-machine env fdshkjlfsd)
Error: Host does not exist: fdshkjlfsd

@tianon
Copy link
Contributor

tianon commented May 29, 2015

@ehazlett yeah, what Nathan said -- exit code for eval isn't used, but stderr is not captured at all so it's definitely the appropriate place for error messages

@ehazlett
Copy link
Contributor

ehazlett commented Jun 2, 2015

@nathanleclaire @tianon perfect. closing as this looks correct.

@ehazlett ehazlett closed this as completed Jun 2, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants