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/12 02:37:47 UTC
[2/2] incubator-mynewt-newt git commit: newt - Don't print syscfg
warning text
newt - Don't print syscfg warning text
Only display syscfg warnings for the "target config" command.
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/41e8c790
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/41e8c790
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/41e8c790
Branch: refs/heads/develop
Commit: 41e8c790bfbb3e8fa0c195be370d44662cfa01f6
Parents: 59c2111
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Oct 11 19:36:39 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Oct 11 19:37:35 2016 -0700
----------------------------------------------------------------------
newt/builder/targetbuild.go | 5 -----
newt/cli/target_cmds.go | 8 ++++++++
2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/41e8c790/newt/builder/targetbuild.go
----------------------------------------------------------------------
diff --git a/newt/builder/targetbuild.go b/newt/builder/targetbuild.go
index 620ea45..3db321a 100644
--- a/newt/builder/targetbuild.go
+++ b/newt/builder/targetbuild.go
@@ -150,11 +150,6 @@ func (t *TargetBuilder) validateAndWriteCfg(
return util.NewNewtError(errText)
}
- warningText := strings.TrimSpace(cfgResolution.WarningText())
- for _, line := range strings.Split(warningText, "\n") {
- log.Warn(line)
- }
-
if err := syscfg.EnsureWritten(cfgResolution.Cfg,
GeneratedIncludeDir(t.target.Name())); err != nil {
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/41e8c790/newt/cli/target_cmds.go
----------------------------------------------------------------------
diff --git a/newt/cli/target_cmds.go b/newt/cli/target_cmds.go
index ebb5186..ff284f7 100644
--- a/newt/cli/target_cmds.go
+++ b/newt/cli/target_cmds.go
@@ -28,6 +28,7 @@ import (
"sort"
"strings"
+ log "github.com/Sirupsen/logrus"
"github.com/spf13/cobra"
"mynewt.apache.org/newt/newt/builder"
"mynewt.apache.org/newt/newt/pkg"
@@ -440,6 +441,13 @@ func targetConfigCmd(cmd *cobra.Command, args []string) {
NewtUsage(nil, err)
}
+ warningText := strings.TrimSpace(cfgResolution.WarningText())
+ if warningText != "" {
+ for _, line := range strings.Split(warningText, "\n") {
+ log.Warn(line)
+ }
+ }
+
printCfg(t.Name(), cfgResolution.Cfg)
}