Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

keep machine URL consistent in machine config and machine env#649

Merged
ehazlett merged 1 commit intodocker-archive-public:masterfrom
shawnzhu:no-escape-quote
Feb 27, 2015
Merged

keep machine URL consistent in machine config and machine env#649
ehazlett merged 1 commit intodocker-archive-public:masterfrom
shawnzhu:no-escape-quote

Conversation

@shawnzhu
Copy link
Copy Markdown

Now it output double-quoted string value for docker host only when performing command machine config:

$ machine config
--tls --tlscacert=/.client/ca.pem --tlscert=/.client/cert.pem --tlskey=/.client/key.pem -H="tcp://192.168.99.100:2376"

Which works for docker command only because of moby/moby#6147 but not for other project like drone/drone which uses codegangsta/cli that does not trim quotes for string flag all the time.

This PR will enable scenario like command drone build $(docker-machine config) on OS X, which doesn't work util it removes the double quotes of docker host from command machine config. (notice that it doesn't use double quotes in machine env too)

@ehazlett
Copy link
Copy Markdown
Contributor

LGTM

@ehazlett
Copy link
Copy Markdown
Contributor

/cc @nathanleclaire

Comment thread commands_test.go Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should these type of "undo" things be in some defers so that when the t.Fatal's are run we still reset the env?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

absolutely +1 -- thx!

@shawnzhu I will do a follow up PR after this is merged to add all of the defer cleanup.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks @duglin
@ehazlett I just updated this PR to use defer and remove unexpected stdout in test output.

Signed-off-by: Ke Zhu <kzhu@us.ibm.com>
@nathanleclaire
Copy link
Copy Markdown
Contributor

Arg, I could have sworn there was a reason I implemented it this way, but unfortunately I can't remember why. So I'm hoping it was just aesthetics - LGTM

ehazlett added a commit that referenced this pull request Feb 27, 2015
keep machine URL consistent in machine config and machine env
@ehazlett ehazlett merged commit 84cbb48 into docker-archive-public:master Feb 27, 2015
@ehazlett
Copy link
Copy Markdown
Contributor

thx

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.

4 participants