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 2016/09/06 18:41:43 UTC

[1/2] incubator-mynewt-newt git commit: MYNEWT-321; check for http error code when downloading files from github. non-200 status codes are considered errors.

Repository: incubator-mynewt-newt
Updated Branches:
  refs/heads/develop 2c44ae5f4 -> fa79d0c57


MYNEWT-321; check for http error code when downloading files from github.
non-200 status codes are considered errors.


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

Branch: refs/heads/develop
Commit: 568ceb45ecf8ec71184146b69462ec67edf03e3d
Parents: 2c44ae5
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Sep 6 11:10:52 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Sep 6 11:10:52 2016 -0700

----------------------------------------------------------------------
 newt/downloader/downloader.go | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/568ceb45/newt/downloader/downloader.go
----------------------------------------------------------------------
diff --git a/newt/downloader/downloader.go b/newt/downloader/downloader.go
index 1a816d5..71b21c7 100644
--- a/newt/downloader/downloader.go
+++ b/newt/downloader/downloader.go
@@ -73,6 +73,11 @@ func (gd *GithubDownloader) FetchFile(name string, dest string) error {
 	if err != nil {
 		return util.NewNewtError(err.Error())
 	}
+	if rsp.StatusCode != http.StatusOK {
+		return util.NewNewtError(fmt.Sprintf(
+			"Failed to download '%s' from https://github.com/%s/%s: %s\n",
+			name, gd.User, gd.Repo, rsp.Status))
+	}
 	defer rsp.Body.Close()
 
 	handle, err := os.Create(dest)


[2/2] incubator-mynewt-newt git commit: Fix typo in error message.

Posted by ma...@apache.org.
Fix typo in error message.


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

Branch: refs/heads/develop
Commit: fa79d0c57babf002485294a4334e85be90ebd8d3
Parents: 568ceb4
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Sep 6 11:40:42 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Sep 6 11:40:42 2016 -0700

----------------------------------------------------------------------
 newt/repo/repo.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/fa79d0c5/newt/repo/repo.go
----------------------------------------------------------------------
diff --git a/newt/repo/repo.go b/newt/repo/repo.go
index 4d55631..da34fe4 100644
--- a/newt/repo/repo.go
+++ b/newt/repo/repo.go
@@ -237,7 +237,7 @@ func NewRepoDesc(name string, versBranchMap map[string]string) (*RepoDesc, error
 func (r *Repo) GetRepoDesc() (*RepoDesc, error) {
 	if r.rdesc == nil {
 		return nil, util.NewNewtError(fmt.Sprintf(
-			"Repository description for %s not yet initailized.  Must "+
+			"Repository description for %s not yet initialized.  Must "+
 				"download it first. ", r.Name()))
 	} else {
 		return r.rdesc, nil