File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 3030package builder
3131
3232import (
33+ "errors"
3334 "fmt"
35+ "os/exec"
3436 "path/filepath"
3537 "runtime"
3638 "strings"
@@ -118,14 +120,16 @@ func (s *ArduinoPreprocessorRunner) Run(ctx *types.Context) error {
118120
119121 buf , err := command .Output ()
120122 if err != nil {
121- return i18n .WrapError (err )
123+ return errors . New ( i18n .WrapError (err ). Error () + string ( err .( * exec. ExitError ). Stderr ) )
122124 }
123- output := string (buf )
125+
126+ result := utils .NormalizeUTF8 (buf )
127+
124128 //fmt.Printf("PREPROCESSOR OUTPUT:\n%s\n", output)
125129 if ctx .CodeCompleteAt != "" {
126- ctx .CodeCompletions = output
130+ ctx .CodeCompletions = string ( result )
127131 } else {
128- ctx .Source = output
132+ ctx .Source = string ( result )
129133 }
130134 return nil
131135}
You can’t perform that action at this time.
0 commit comments