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/11/15 16:27:43 UTC

[GitHub] mkiiskila closed pull request #240: builder; fix crash when inspecting malformed SDK pkg missing src/ext

mkiiskila closed pull request #240: builder; fix crash when inspecting malformed SDK pkg missing src/ext
URL: https://github.com/apache/mynewt-newt/pull/240
 
 
   

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/builder/buildpackage.go b/newt/builder/buildpackage.go
index c89e6fde..c4f26986 100644
--- a/newt/builder/buildpackage.go
+++ b/newt/builder/buildpackage.go
@@ -197,6 +197,10 @@ func (bpkg *BuildPackage) CompilerInfo(
 func (bpkg *BuildPackage) findSdkIncludes() []string {
 	sdkDir := bpkg.rpkg.Lpkg.BasePath() + "/src/ext/"
 
+	if _, err := os.Stat(sdkDir); err != nil {
+		return []string{}
+	}
+
 	sdkPathList := []string{}
 	err := filepath.Walk(sdkDir,
 		func(path string, info os.FileInfo, err error) 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