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:22:17 UTC
[08/13] 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/a9bacbcd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/a9bacbcd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/a9bacbcd
Branch: refs/heads/develop
Commit: a9bacbcd1a9218288513811c3179bce77d75f79a
Parents: f30e50e
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Apr 25 14:54:14 2016 -0700
Committer: Vipul Rahane <vi...@runtime.io>
Committed: Tue May 17 12:39:53 2016 -0700
----------------------------------------------------------------------
newtmgr/cli/echo.go | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/a9bacbcd/newtmgr/cli/echo.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/echo.go b/newtmgr/cli/echo.go
index f440cae..d3addc3 100644
--- a/newtmgr/cli/echo.go
+++ b/newtmgr/cli/echo.go
@@ -54,6 +54,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()