mirror of
https://github.com/docker/docs.git
synced 2026-11-05 00:14:17 +03:00
Merge pull request #2528 from jhoos/vmwarefusion-umask
Explicitly set umask before invoking vmrun in vmwarefusion
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/docker/machine/libmachine/log"
|
||||
)
|
||||
@@ -36,6 +37,9 @@ func setVmwareCmd(cmd string) string {
|
||||
}
|
||||
|
||||
func vmrun(args ...string) (string, string, error) {
|
||||
// vmrun with nogui on VMware Fusion through at least 8.0.1 doesn't work right
|
||||
// if the umask is set to not allow world-readable permissions
|
||||
_ = syscall.Umask(022)
|
||||
cmd := exec.Command(vmrunbin, args...)
|
||||
if os.Getenv("MACHINE_DEBUG") != "" {
|
||||
cmd.Stdout = os.Stdout
|
||||
|
||||
Reference in New Issue
Block a user