We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44aeba7 commit 4fe5428Copy full SHA for 4fe5428
preprocess_sketch.go
@@ -30,7 +30,9 @@
30
package builder
31
32
import (
33
+ "errors"
34
"fmt"
35
+ "os/exec"
36
"path/filepath"
37
"runtime"
38
"strings"
@@ -118,14 +120,16 @@ func (s *ArduinoPreprocessorRunner) Run(ctx *types.Context) error {
118
120
119
121
buf, err := command.Output()
122
if err != nil {
- return i18n.WrapError(err)
123
+ return errors.New(i18n.WrapError(err).Error() + string(err.(*exec.ExitError).Stderr))
124
}
- output := string(buf)
125
+
126
+ result := utils.NormalizeUTF8(buf)
127
128
//fmt.Printf("PREPROCESSOR OUTPUT:\n%s\n", output)
129
if ctx.CodeCompleteAt != "" {
- ctx.CodeCompletions = output
130
+ ctx.CodeCompletions = string(result)
131
} else {
- ctx.Source = output
132
+ ctx.Source = string(result)
133
134
return nil
135
0 commit comments