You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by pa...@apache.org on 2016/08/31 18:12:58 UTC
incubator-mynewt-newt git commit: MYNEWT-317
Repository: incubator-mynewt-newt
Updated Branches:
refs/heads/develop 05cc70132 -> faee1f4c6
MYNEWT-317
ensure that we can still run things like sim that don't create images or manifests
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/faee1f4c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/faee1f4c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/faee1f4c
Branch: refs/heads/develop
Commit: faee1f4c6f6f387b9505d2eede41a99474663b67
Parents: 05cc701
Author: Paul Dietrich <pa...@yahoo.com>
Authored: Wed Aug 31 11:11:45 2016 -0700
Committer: Paul Dietrich <pa...@yahoo.com>
Committed: Wed Aug 31 11:12:39 2016 -0700
----------------------------------------------------------------------
newt/cli/run_cmds.go | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/faee1f4c/newt/cli/run_cmds.go
----------------------------------------------------------------------
diff --git a/newt/cli/run_cmds.go b/newt/cli/run_cmds.go
index 57309a1..c8a1078 100644
--- a/newt/cli/run_cmds.go
+++ b/newt/cli/run_cmds.go
@@ -79,14 +79,18 @@ func runRunCmd(cmd *cobra.Command, args []string) {
}
} else {
os.Remove(b.App.AppImgPath())
- os.Remove(b.Loader.AppImgPath())
- }
- build_id := image.CreateBuildId(app_img, loader_img)
+ if b.Loader != nil {
+ os.Remove(b.Loader.AppImgPath())
+ }
+ }
+ if app_img != nil {
+ build_id := image.CreateBuildId(app_img, loader_img)
- err = image.CreateManifest(b, app_img, loader_img, build_id)
- if err != nil {
- NewtUsage(cmd, err)
+ err = image.CreateManifest(b, app_img, loader_img, build_id)
+ if err != nil {
+ NewtUsage(cmd, err)
+ }
}
err = b.Load()