Browse Source

Added filter for .vendor dir

pull/103/head
Unknown 11 years ago
parent
commit
5b6ee0cd5c
  1. 11
      cmd/helper_windows.go

11
cmd/helper_windows.go

@ -1,13 +1,16 @@
package cmd package cmd
import ( import (
"github.com/Unknwon/com"
"github.com/gpmgo/gopm/doc"
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"strings"
"syscall" "syscall"
"unsafe" "unsafe"
"github.com/Unknwon/com"
"github.com/gpmgo/gopm/doc"
) )
func makeLink(srcPath, destPath string) error { func makeLink(srcPath, destPath string) error {
@ -33,7 +36,9 @@ func makeLink(srcPath, destPath string) error {
} }
os.RemoveAll(destPath) os.RemoveAll(destPath)
err := com.CopyDir(srcPath, destPath) err := com.CopyDir(srcPath, destPath, func(filePath string) bool {
return strings.Contains(filePath, doc.VENDOR)
})
if err == nil { if err == nil {
// .vendor dir should not be copy // .vendor dir should not be copy
os.RemoveAll(filepath.Join(destPath, doc.VENDOR)) os.RemoveAll(filepath.Join(destPath, doc.VENDOR))

Loading…
Cancel
Save