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 30
30
package builder
31
31
32
32
import (
33
+ "errors"
33
34
"fmt"
35
+ "os/exec"
34
36
"path/filepath"
35
37
"runtime"
36
38
"strings"
@@ -118,14 +120,16 @@ func (s *ArduinoPreprocessorRunner) Run(ctx *types.Context) error {
118
120
119
121
buf , err := command .Output ()
120
122
if err != nil {
121
- return i18n .WrapError (err )
123
+ return errors . New ( i18n .WrapError (err ). Error () + string ( err .( * exec. ExitError ). Stderr ) )
122
124
}
123
- output := string (buf )
125
+
126
+ result := utils .NormalizeUTF8 (buf )
127
+
124
128
//fmt.Printf("PREPROCESSOR OUTPUT:\n%s\n", output)
125
129
if ctx .CodeCompleteAt != "" {
126
- ctx .CodeCompletions = output
130
+ ctx .CodeCompletions = string ( result )
127
131
} else {
128
- ctx .Source = output
132
+ ctx .Source = string ( result )
129
133
}
130
134
return nil
131
135
}
You can’t perform that action at this time.
0 commit comments