diff --git a/handler/builder.go b/handler/builder.go index 54eff22..8464f72 100644 --- a/handler/builder.go +++ b/handler/builder.go @@ -141,12 +141,12 @@ func (handler *InoHandler) generateBuildEnvironment() (*paths.Path, error) { CompilerOut string `json:"compiler_out"` CompilerErr string `json:"compiler_err"` BuilderResult cmdBuilderRes `json:"builder_result"` + Success bool `json:"success"` } var res cmdRes if err := json.Unmarshal(cmdOutput.Bytes(), &res); err != nil { return nil, errors.Errorf("parsing arduino-cli output: %s", err) } - // Return only the build path log.Println("arduino-cli output:", cmdOutput) return res.BuilderResult.BuildPath, nil diff --git a/handler/handler.go b/handler/handler.go index 1a0f8e0..be8247a 100644 --- a/handler/handler.go +++ b/handler/handler.go @@ -691,9 +691,7 @@ func examineCompileCommandsJSON(compileCommandsDir *paths.Path) map[string]bool compilers[compiler] = true } - if len(compilers) == 0 { - panic("main compiler not found") - } + // Save back compile_commands.json with OS native file separator and extension compileCommands.SaveToFile()