Skip to content

Commit 90d3f0c

Browse files
authored
Merge pull request #36 from pecigonzalo/feature/symlink_paths
Feature/symlink paths
2 parents 9f849d6 + 7e30d8e commit 90d3f0c

File tree

7 files changed

+30
-29
lines changed

7 files changed

+30
-29
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Glide
22
vendor/
3+
.glide/
34

45
# Compiled Object files, Static and Dynamic libs (Shared Objects)
56
*.o

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 1.1.0
4+
IMPROVEMENTS:
5+
* Updated docker-machine deps
6+
* Updated testImport deps
7+
* Fixes #32 (Unable to complete build when .docker folder is on a symlink)
8+
39
## 1.0.10
410
IMPROVEMENTS:
511
* Mount on both /c/Users and /Users for compatibility

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
default: deps test build
44

5-
deps: clean
5+
deps:
66
go get github.com/Masterminds/glide
77
glide install
88

appveyor.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# appveyor.yml reference : http://www.appveyor.com/docs/appveyor-yml
22

3-
version: "1.0.10.{build}"
3+
version: "1.1.0.{build}"
44

55
# Source Config
66
pull_requests:
@@ -12,30 +12,25 @@ clone_folder: c:\gopath\src\github.com\pecigonzalo\docker-machine-vmwareworkstat
1212
clone_depth: 5
1313

1414
# Build host
15-
1615
os: Windows Server 2012 R2
1716

1817
environment:
1918
MSYSTEM: MINGW64
2019
Msys: winsymlink:nativestrict
2120
GOPATH: c:\gopath
22-
Path: c:\go\bin;c:\gopath\bin;C:\msys64\usr\local\bin;C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%
23-
matrix:
24-
- GOARCH: 386
25-
GOVERSION: 1.6
26-
- GOARCH: amd64
27-
GOVERSION: 1.6
21+
Path: c:\go\bin;%GOPATH%\bin;C:\msys64\usr\local\bin;C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%
2822

2923
init:
3024
- ps: git config --global core.autocrlf input
3125
- pacman -Sy
32-
- pacman -S --noconfirm make wget curl bzr git mercurial subversion
26+
- pacman -S --noconfirm --needed make wget curl
3327

3428
# Build
3529
install:
36-
- appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-%GOARCH%.msi
37-
- msiexec /i go%GOVERSION%.windows-%GOARCH%.msi /q
30+
- go version
31+
- go env
3832
- ps: echo $env:Path
33+
- make clean
3934
- make deps
4035

4136
cache:
@@ -50,7 +45,7 @@ test: off
5045

5146
# Deploy
5247
artifacts:
53-
- path: //bin/docker-machine-driver-vmwareworkstation.exe
48+
- path: /bin/docker-machine-driver-vmwareworkstation.exe
5449

5550
deploy:
5651
provider: GitHub

glide.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

glide.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package: github.com/pecigonzalo/docker-machine-vmwareworkstation
22
import:
33
- package: github.com/docker/machine
4-
version: v0.7.0
4+
version: v0.9.0
55
subpackages:
66
- libmachine/drivers
77
- libmachine/drivers/plugin
@@ -15,6 +15,6 @@ import:
1515
- ssh
1616
testImport:
1717
- package: github.com/stretchr/testify
18-
version: v1.1.3
18+
version: v1.1.4
1919
subpackages:
2020
- assert

workstation.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"io/ioutil"
1515
"net"
1616
"os"
17-
"path/filepath"
1817
"regexp"
1918
"runtime"
2019
"strings"
@@ -193,13 +192,13 @@ func (d *Driver) GetIP() (string, error) {
193192
return ip, nil
194193
}
195194

195+
// GetState returns the current state of the machine.
196196
func (d *Driver) GetState() (state.State, error) {
197197
// VMRUN only tells use if the vm is running or not
198-
vmxp, err := filepath.EvalSymlinks(d.vmxPath())
199-
if err != nil {
198+
if _, err := os.Stat(d.vmxPath()); os.IsNotExist(err) {
200199
return state.Error, err
201200
}
202-
if stdout, _, _ := vmrun("list"); strings.Contains(stdout, vmxp) {
201+
if stdout, _, _ := vmrun("list"); strings.Contains(stdout, d.vmxPath()) {
203202
return state.Running, nil
204203
}
205204
return state.Stopped, nil
@@ -451,7 +450,7 @@ func (d *Driver) Remove() error {
451450

452451
func (d *Driver) Restart() error {
453452
_, _, err := vmrun("reset", d.vmxPath(), "nogui")
454-
453+
455454
log.Debugf("Mounting Shared Folders...")
456455
var shareName, shareDir, guestFolder, guestCompatLink string // TODO configurable at some point
457456
switch runtime.GOOS {
@@ -484,7 +483,7 @@ func (d *Driver) Restart() error {
484483
vmrun("-gu", B2DUser, "-gp", B2DPass, "runScriptInGuest", d.vmxPath(), "/bin/sh", command)
485484
}
486485
}
487-
486+
488487
return err
489488
}
490489

0 commit comments

Comments
 (0)