You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/02/21 22:58:16 UTC

[GitHub] ccollins476ad closed pull request #137: Don't require repo TOC in project.yml

ccollins476ad closed pull request #137:  Don't require repo TOC in project.yml
URL: https://github.com/apache/mynewt-newt/pull/137
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/newt/project/project.go b/newt/project/project.go
index cdd0b84f..6a00ef88 100644
--- a/newt/project/project.go
+++ b/newt/project/project.go
@@ -558,10 +558,15 @@ func (proj *Project) loadConfig() error {
 		r.AddIgnoreDir(ignDir)
 	}
 
-	rstrs := yc.GetValStringSlice("project.repositories", nil)
-	for _, repoName := range rstrs {
-		if err := proj.loadRepo(repoName, yc); err != nil {
-			return err
+	// Assume every item starting with "repository." is a repository descriptor
+	// and try to load it.
+	for k, _ := range yc.AllSettings() {
+		repoName := strings.TrimPrefix(k, "repository.")
+		if repoName != k {
+			if err := proj.loadRepo(repoName, yc); err != nil {
+				util.StatusMessage(util.VERBOSITY_QUIET,
+					"* Warning: %s\n", err.Error())
+			}
 		}
 	}
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services