Skip to content
This repository has been archived by the owner on Feb 27, 2018. It is now read-only.

Don't mix unset and exports, and cater for spaces in the cert path #351

Closed

Conversation

SvenDowideit
Copy link
Contributor

Signed-off-by: Sven Dowideit SvenDowideit@home.org.au

I've copied the docker-machine code, and then escape the spaces.

Closes: boot2docker/boot2docker#716 boot2docker/boot2docker#715

}
}
}
env := exports(socket, certPath)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The downside to this is that if another env var is introduced tomorrow, this change will no longer report it, as it hard-codes the env var keys. Your call, though, Sven.

nit: looks like 201/202 were not both formatted by gofmt.

Otherwise, LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the magic future proofing was neat looking, and worked for TLS, but with b2d being slowly on the way out, and as I fixed the spaced path in docker-machine, figure going with the same code they have is safe enough :)

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
@SvenDowideit SvenDowideit force-pushed the use-machine-env-code branch from 7ee551b to 1c48ea8 Compare March 3, 2015 23:08
@databus23
Copy link

Another env var was just introduced with #345. Also this one is not always present and can be either no_proxy or NO_PROXY. So I think they old way of doing it dynamic needs to stay.

@tianon
Copy link
Contributor

tianon commented Mar 12, 2015

If we suggest that people use eval $(b2d shellinit), this problem goes away, doesn't it?

@SvenDowideit
Copy link
Contributor Author

no? the issue lists a number of problems with the code currently.

@SvenDowideit
Copy link
Contributor Author

@databus23 cool - I'll code it in too - presumably machine has added it to their code?

@tianon
Copy link
Contributor

tianon commented Mar 16, 2015

What I'm saying is that using eval $(...) instead of just $(...) would fix boot2docker/boot2docker#716.

@tianon
Copy link
Contributor

tianon commented Mar 16, 2015

As was mentioned in boot2docker/boot2docker#716 (comment) 👍

@tianon
Copy link
Contributor

tianon commented Mar 16, 2015

What I'm trying to say is that we should do this, yes, but we should also update our documentation to include eval appropriately.

@SvenDowideit
Copy link
Contributor Author

@tianon oh. ic - is that what you didn't say :p

@@ -225,7 +218,7 @@ func exports(socket, certPath string) map[string]string {
if certPath == "" {
out["DOCKER_TLS_VERIFY"] = ""
} else {
out["DOCKER_TLS_VERIFY"] = "1"
out["DOCKER_TLS_VERIFY"] = "yes"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the motivation for changing this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to make it the same as in machine....

I'm basically taking the POV that if our code looks more like theirs, then its will be easier for people that might need to back-port changes.

Copy link
Contributor

@tianon tianon Mar 17, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SvenDowideit
Copy link
Contributor Author

replaced by #361

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

$(boot2docker shellinit) frequently fails (OSX)
4 participants