Skip to content

Commit 42b1f4e

Browse files
committed
Merge pull request docker-archive-public#2721 from rediceli/master
Fix docker-archive-public#2717, Driver vmwarefusion fail because of soft link
2 parents 03171b8 + ccb8c31 commit 42b1f4e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/vmwarefusion/fusion_darwin.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"io/ioutil"
1212
"net"
1313
"os"
14+
"path/filepath"
1415
"regexp"
1516
"runtime"
1617
"strings"
@@ -198,7 +199,11 @@ func (d *Driver) GetIP() (string, error) {
198199

199200
func (d *Driver) GetState() (state.State, error) {
200201
// VMRUN only tells use if the vm is running or not
201-
if stdout, _, _ := vmrun("list"); strings.Contains(stdout, d.vmxPath()) {
202+
vmxp, err := filepath.EvalSymlinks(d.vmxPath())
203+
if err != nil {
204+
return state.Error, err
205+
}
206+
if stdout, _, _ := vmrun("list"); strings.Contains(stdout, vmxp) {
202207
return state.Running, nil
203208
}
204209
return state.Stopped, nil

0 commit comments

Comments
 (0)