You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/10/04 03:51:12 UTC

[1/2] incubator-mynewt-newt git commit: newt - Remove unused "Clean" function.

Repository: incubator-mynewt-newt
Updated Branches:
  refs/heads/develop 21f833c96 -> b90fb9df8


newt - Remove unused "Clean" function.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/93ec8690
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/93ec8690
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/93ec8690

Branch: refs/heads/develop
Commit: 93ec86908d82bb1c5f50a45429527ee63026680d
Parents: 21f833c
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Oct 3 20:48:44 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Oct 3 20:48:44 2016 -0700

----------------------------------------------------------------------
 newt/builder/targetbuild.go | 13 -------------
 1 file changed, 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/93ec8690/newt/builder/targetbuild.go
----------------------------------------------------------------------
diff --git a/newt/builder/targetbuild.go b/newt/builder/targetbuild.go
index cb6621e..22fd0af 100644
--- a/newt/builder/targetbuild.go
+++ b/newt/builder/targetbuild.go
@@ -21,7 +21,6 @@ package builder
 
 import (
 	"fmt"
-	"os"
 	"strings"
 
 	log "github.com/Sirupsen/logrus"
@@ -510,18 +509,6 @@ func (t *TargetBuilder) Test() error {
 	return nil
 }
 
-func (t *TargetBuilder) Clean() error {
-	path := TargetBinDir(t.target)
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Cleaning directory %s\n",
-		path)
-	err := os.RemoveAll(path)
-	if err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	return nil
-}
-
 func (t *TargetBuilder) GetTarget() *target.Target {
 	return (*t).target
 }


[2/2] incubator-mynewt-newt git commit: newt - Fix crash for unrecognized commands.

Posted by cc...@apache.org.
newt - Fix crash for unrecognized commands.

Example:

[ccollins@ccollins-mac:~/go/src/mynewt.apache.org/newt/newt]$ newt asdas
Error: unknown command "asdas" for "newt"
Run 'newt --help' for usage.
panic: interface conversion: error is *errors.errorString, not *util.NewtError

goroutine 1 [running]:
panic(0x5380e0, 0xc820238640)
        /usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
mynewt.apache.org/newt/newt/cli.NewtUsage(0x0, 0xd40000, 0xc820236080)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/cli/util.go:45 +0x4a7
main.main()
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/newt.go:150 +0x2db


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/b90fb9df
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/b90fb9df
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/b90fb9df

Branch: refs/heads/develop
Commit: b90fb9df81aba46d7b569faadb43475cbc36c542
Parents: 93ec869
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Oct 3 20:50:03 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Oct 3 20:50:30 2016 -0700

----------------------------------------------------------------------
 newt/newt.go | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/b90fb9df/newt/newt.go
----------------------------------------------------------------------
diff --git a/newt/newt.go b/newt/newt.go
index de37ad8..c0327d4 100644
--- a/newt/newt.go
+++ b/newt/newt.go
@@ -146,7 +146,4 @@ func main() {
 	}
 
 	log.SetLevel(hold_lvl)
-	if err := cmd.Execute(); err != nil {
-		cli.NewtUsage(nil, err)
-	}
 }