mirror of https://github.com/status-im/xgo.git
Skip any failing GOPATH walks to prevent panics.
This commit is contained in:
parent
9224c09098
commit
2c9e034d93
5
xgo.go
5
xgo.go
|
@ -181,6 +181,11 @@ func compile(repo string, image string, remote string, branch string, pack strin
|
||||||
// Since docker sandboxes volumes, resolve any symlinks manually
|
// Since docker sandboxes volumes, resolve any symlinks manually
|
||||||
sources := filepath.Join(gopath, "src")
|
sources := filepath.Join(gopath, "src")
|
||||||
filepath.Walk(sources, func(path string, info os.FileInfo, err error) error {
|
filepath.Walk(sources, func(path string, info os.FileInfo, err error) error {
|
||||||
|
// Skip any folders that errored out
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Failed to access GOPATH element %s: %v", path, err)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
// Skip anything that's not a symlink
|
// Skip anything that's not a symlink
|
||||||
if info.Mode()&os.ModeSymlink == 0 {
|
if info.Mode()&os.ModeSymlink == 0 {
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue