-
Notifications
You must be signed in to change notification settings - Fork 72
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
Show a nice warning when running without root #64
Comments
@johanneswuerbach Yes, I think so, too. I tried I think, the e.g. (example code. too dirty.) // Print driver version, Check VirtualBox version
func (d *Driver) PreCreateCheck() error {
.
.
.
bin, err := os.Stat(os.Args[0])
if err != nil {
return err
}
if int(bin.Sys().(*syscall.Stat_t).Uid) == 501 {
log.Infof("docker-machine-driver-xhyve need root owner. See https://github.com/zchee/docker-machine-driver-xhyve#install")
os.Exit(1)
}
return nil
} What do you think? |
Yep, exactly like this 👍 |
@johanneswuerbach :) |
@johanneswuerbach I created a pull-request :) |
Merged 278eb5a. If you find a bug, Could you tell me? Close. |
this is really annoying. I still have this issue on mac os 10.11.4 |
Currently users running
docker-machine create -d xhyve test
without root are receiving an ugly error messageError creating machine: Error in driver during machine creation: exit status 1
Instead this driver should print a nice warning and tell the users that root is required.
The text was updated successfully, but these errors were encountered: