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 2015/11/03 23:34:32 UTC

[2/2] incubator-mynewt-newt git commit: Add target.Identities to command line args when invoking download/debug.

Add target.Identities to command line args when invoking download/debug.


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

Branch: refs/heads/master
Commit: 0c3bbfa55b112cd399b9845f10d6eae04dbdc4ea
Parents: a0e79e4
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 3 14:33:44 2015 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 3 14:33:44 2015 -0800

----------------------------------------------------------------------
 cli/target.go | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/0c3bbfa5/cli/target.go
----------------------------------------------------------------------
diff --git a/cli/target.go b/cli/target.go
index 034728d..4a7c64a 100644
--- a/cli/target.go
+++ b/cli/target.go
@@ -428,10 +428,9 @@ func (t *Target) Download() error {
 
 	os.Chdir(t.Nest.BasePath)
 
-	StatusMessage(VERBOSITY_DEFAULT, "Downloading with %s \n", downloadScript)
-
-	rsp, err := ShellCommand(fmt.Sprintf("%s %s", downloadScript,
-		filepath.Join(p.BinPath(), p.Name)))
+	StatusMessage(VERBOSITY_DEFAULT, "Downloading with %s\n", downloadScript)
+	rsp, err := ShellCommand(fmt.Sprintf("%s %s %s", downloadScript,
+		filepath.Join(p.BinPath(), p.Name), strings.Join(t.Identities, " ")))
 	if err != nil {
 		StatusMessage(VERBOSITY_DEFAULT, "%s", rsp);
 		return err
@@ -474,8 +473,9 @@ func (t *Target) Debug() error {
 
 	StatusMessage(VERBOSITY_DEFAULT, "Debugging with %s %s\n", debugScript, p.Name)
 
-	err = ShellInteractiveCommand([]string{debugScript,
-		filepath.Join(p.BinPath(), p.Name)})
+	cmdLine := []string{debugScript, filepath.Join(p.BinPath(), p.Name)}
+	cmdLine = append(cmdLine, t.Identities...)
+	err = ShellInteractiveCommand(cmdLine)
 	if err != nil {
 		return err
 	}