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
import (
"github.com/Unknwon/com"
"github.com/gpmgo/gopm/doc"
"os"
"os/exec"
"path/filepath"
"strings"
"syscall"
"unsafe"
"github.com/Unknwon/com"
"github.com/gpmgo/gopm/doc"
)
func makeLink(srcPath, destPath string) error {
@ -33,7 +36,9 @@ func makeLink(srcPath, destPath string) error {
}
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 {
// .vendor dir should not be copy
os.RemoveAll(filepath.Join(destPath, doc.VENDOR))

Loading…
Cancel
Save