From 91d5d3d067e1b06d7e78acca84c5fa6b2bd5ea2b Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 8 Dec 2013 16:16:27 -0500 Subject: [PATCH 1/4] Update --- doc/walker.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/doc/walker.go b/doc/walker.go index a3ccc3b0d..4b9efa713 100644 --- a/doc/walker.go +++ b/doc/walker.go @@ -117,12 +117,8 @@ func (w *walker) build(srcs []*source, nod *Node) ([]string, error) { if err != nil { if nogo { err = nil - } else if strings.Contains(err.Error(), "expected 'package'") { - log.Warn("walker: %s", err.Error()) - return nil, nil } else { - log.Error("walker", "Error occurs when check imports:") - log.Error("", "\t"+err.Error()) + log.Warn("walker: %s", err.Error()) return nil, nil } } From 167b9fb7e37a101f48def96323960eb0123144be Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 9 Dec 2013 09:39:57 -0500 Subject: [PATCH 2/4] Fixed color output when use --noterm in fatal --- README.md | 2 +- gopm.go | 2 +- log/logP.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1cd774352..a2ea519a1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ USAGE: gopm [global options] command [command options] [arguments...] VERSION: - 0.6.0.1206 + 0.6.0.1209 COMMANDS: get fetch remote package(s) and dependencies to local repository diff --git a/gopm.go b/gopm.go index 19d88b883..c3d3a7893 100644 --- a/gopm.go +++ b/gopm.go @@ -29,7 +29,7 @@ import ( // Test that go1.1 tag above is included in builds. main.go refers to this definition. const go11tag = true -const APP_VER = "0.6.0.1207" +const APP_VER = "0.6.0.1209" // //cmd.CmdSearch, // cmdClean, diff --git a/log/logP.go b/log/logP.go index 10cd9ab99..406718ad6 100644 --- a/log/logP.go +++ b/log/logP.go @@ -32,7 +32,7 @@ func errorP(hl, msg string) { } func fatal(hl, msg string) { - Error(hl, msg) + errorP(hl, msg) os.Exit(2) } From 5b6ee0cd5caec0652f780fde0de00de410d9ebc8 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 9 Dec 2013 16:04:43 -0500 Subject: [PATCH 3/4] Added filter for .vendor dir --- cmd/helper_windows.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/helper_windows.go b/cmd/helper_windows.go index ea619c116..cf632582d 100644 --- a/cmd/helper_windows.go +++ b/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)) From 0e1e063bd4e7928bdd190e9ed113a3d1fd18f56a Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 9 Dec 2013 16:12:03 -0500 Subject: [PATCH 4/4] Added filter for .vendor dir --- cmd/helper_windows.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmd/helper_windows.go b/cmd/helper_windows.go index cf632582d..3ce70f060 100644 --- a/cmd/helper_windows.go +++ b/cmd/helper_windows.go @@ -36,14 +36,9 @@ func makeLink(srcPath, destPath string) error { } os.RemoveAll(destPath) - err := com.CopyDir(srcPath, destPath, func(filePath string) bool { + return 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)) - } - return err } func volumnType(dir string) string {