Skip to content

Commit dab74a6

Browse files
authored
Merge pull request #254 from yinzara/master
Fixed auto location of vpnkit socket
2 parents e499d90 + 57d4192 commit dab74a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

go/hyperkit.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ const (
4747
// ConsoleLog configures console to a tty and sends its contents to the logs
4848
ConsoleLog
4949

50-
defaultVPNKitSock = "Library/Containers/com.docker.docker/Data/s50"
50+
legacyVPNKitSock = "Library/Containers/com.docker.docker/Data/s50"
51+
defaultVPNKitSock = "Library/Containers/com.docker.docker/Data/vpnkit.eth.sock"
5152

5253
defaultCPUs = 1
5354
defaultMemory = 1024 // 1G
@@ -591,6 +592,9 @@ func checkHyperKit(hyperkit string) (string, error) {
591592
func checkVPNKitSock(vpnkitsock string) (string, error) {
592593
if vpnkitsock == "auto" {
593594
vpnkitsock = filepath.Join(getHome(), defaultVPNKitSock)
595+
if _, err := os.Stat(vpnkitsock); err != nil {
596+
vpnkitsock = filepath.Join(getHome(), legacyVPNKitSock)
597+
}
594598
}
595599
if vpnkitsock == "" {
596600
return "", nil

0 commit comments

Comments
 (0)