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

eval writes wrong env #256

Closed
hezhizhen opened this issue Nov 20, 2017 · 3 comments
Closed

eval writes wrong env #256

hezhizhen opened this issue Nov 20, 2017 · 3 comments

Comments

@hezhizhen
Copy link

hezhizhen commented Nov 20, 2017

I launched dinghy, and the output of dinghy env was:

set -gx DOCKER_HOST tcp:https://192.168.99.100:2376
set -gx DOCKER_CERT_PATH /Users/hezhizhen/.docker/machine/machines/dinghy
set -gx DOCKER_TLS_VERIFY 1
set -gx DOCKER_MACHINE_NAME dinghy

When I ran eval (dinghy env) (I use fish shell), the env was:

DOCKER_CERT_PATH=/Users/hezhizhen/.docker/machine/machines/dinghy
DOCKER_HOST=tcp:https://192.168.99.100:2376set-gxDOCKER_CERT_PATH/Users/hezhizhen/.docker/machine/machines/dinghyset-gxDOCKER_TLS_VERIFY1set-gxDOCKER_MACHINE_NAMEdinghy
DOCKER_MACHINE_NAME=dinghy
DOCKER_TLS_VERIFY=1
  • MacOS: 10.13.1
  • dinghy: 4.6.0
@codekitchen
Copy link
Owner

I've never used the Fish shell myself, the PR to support it came from somebody else. But when I run docker-machine env dinghy --shell=fish I see some differences in formatting:

set -gx DOCKER_TLS_VERIFY "1";
set -gx DOCKER_HOST "tcp:https://192.168.64.6:2376";
set -gx DOCKER_CERT_PATH "/Users/brianp/.docker/machine/machines/dinghy";
set -gx DOCKER_MACHINE_NAME "dinghy";

So I wonder if we need to add quotes and semicolons to the dinghy env output to fix this. Seems worth trying, I'll make that change.

@codekitchen
Copy link
Owner

Yeah that fixed it, I did a quick brew install fish and tried it out.

c8a44d3

You can install Dinghy's master branch using the instructions in the README to get the fix, until I cut a new release.

@hezhizhen
Copy link
Author

I had manually written the output of dinghy env to config.fish, and thus solved the problem. When a new version is released, I will update it and try it. Thank you for your reply and solution.

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

No branches or pull requests

2 participants