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 2020/01/28 17:26:07 UTC
[mynewt-newt] 03/09: repo: Ensure cast of `vers` map succeeds
This is an automated email from the ASF dual-hosted git repository.
ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git
commit afea2f3aff9ef16fd4c5fcb67f2cae508b721e70
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Mon Jan 27 10:53:02 2020 -0800
repo: Ensure cast of `vers` map succeeds
The code was checking the wrong variable to determine success (`ok`
instead of `err`).
---
newt/repo/repo.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/newt/repo/repo.go b/newt/repo/repo.go
index 14bfc89..d316b67 100644
--- a/newt/repo/repo.go
+++ b/newt/repo/repo.go
@@ -417,8 +417,8 @@ func parseRepoDepMap(depName string,
}
versMap, err := cast.ToStringMapStringE(versYml)
- if !ok {
- return nil, util.FmtNewtError("invalid \"vers\" map")
+ if err != nil {
+ return nil, util.FmtNewtError("invalid \"vers\" map: %v", err)
}
fields := map[string]string{}