You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/05/20 01:04:25 UTC

[2/6] incubator-mynewt-newt git commit: newtmgr echo; print out usage help if user passes no arguments.

newtmgr echo; print out usage help if user passes no arguments.


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/c77c2f0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/c77c2f0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/c77c2f0c

Branch: refs/heads/develop
Commit: c77c2f0c20822c9727d0794bfaff53cbf9cda18c
Parents: 1aaf0b0
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Apr 25 14:54:14 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Thu May 19 17:58:40 2016 -0700

----------------------------------------------------------------------
 newtmgr/cli/echo.go | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/c77c2f0c/newtmgr/cli/echo.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/echo.go b/newtmgr/cli/echo.go
index 62b08bb..d1ad619 100644
--- a/newtmgr/cli/echo.go
+++ b/newtmgr/cli/echo.go
@@ -55,6 +55,9 @@ func echoRunCmd(cmd *cobra.Command, args []string) {
 		nmUsage(cmd, err)
 	}
 
+	if len(args) != 1 {
+		nmUsage(cmd, nil);
+	}
 	echo.Message = args[0]
 
 	nmr, err := echo.EncodeWriteRequest()