Skip to content

Conversation

@SvenDowideit
Copy link

...the values look like, and report at least one error

merge me!

tianon and others added 2 commits September 17, 2014 20:21
This includes three new commandline flags to control this behavior, for those who don't want the default (which is currently automount `/Users` for OS X, and automount `C:\Users` for Windows, but will change to automount `homeDir()` at some point in the future):

- `--vbox-share=true: Enable VirtualBox share creation during 'init'`
- `--vbox-share-dir="": Change VirtualBox shared folder created during 'init' from the default autodetection logic`
- `--vbox-share-name="": Change VirtualBox shared folder name created during 'init' from the default of being automatically determined based on the share directory path`
…at the values look like, and report at least one error
Copy link
Owner

Choose a reason for hiding this comment

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

Inadvertent, or trying to sneak in a change to the default value? 😈

Copy link
Author

Choose a reason for hiding this comment

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

perhaps you want to read the rest of the diff?

as your case statement only covers very few GOOS options, and then only the ones that might be true, defaulting to false is the most portable....

Copy link
Owner

Choose a reason for hiding this comment

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

Right, but if the "share directory" is empty, we don't even try sharing.
So with this, the experience on Linux goes from "boot2docker
--vbox-share-dir=/home --vbox-share-name=Users" to the much more verbose
"boot2docker --vbox-share=true --vbox-share-dir=/home
--vbox-share-name=Users", when there isn't really a great reason for it
that I can see for the inconsistency, unless I'm missing something.

Otherwise, I'm +1 on this change and totally agree that it helps with
increasing visibility on the default behavior immensely.

Copy link
Author

Choose a reason for hiding this comment

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

thats a very EW way to quietly toggle the boolean.

its horribly inconsistent to say

  • --vbox-share=true --vbox-share-dir="" - imo that should be an error condition, not a silent change to the bool.

essentially, if you want to toggle based on the dir string, then don't provide an enable bool.

I prefer the bool to mean what it says.

Copy link
Author

Choose a reason for hiding this comment

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

mmm, after thinking a little more - i still think we want to make it false for all the other platforms, and we can do something nicer for windows in the next week.

this entire thing is a compromise..

@tianon tianon force-pushed the vbox-sharing branch 2 times, most recently from 081a853 to b161571 Compare September 23, 2014 03:21
@tianon tianon closed this Sep 23, 2014
@SvenDowideit SvenDowideit deleted the tell-the-user-the-defaults branch October 7, 2014 02:44
tianon pushed a commit that referenced this pull request Oct 14, 2014
Make the cli `go get`-able
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

Successfully merging this pull request may close these issues.

2 participants