Skip to content

Commit c9cad2c

Browse files
committed
[WIN] Launch arduino-preprocessor from volume name path
This workarounds arduino/arduino-preprocessor#2
1 parent be6af46 commit c9cad2c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: src/arduino.cc/builder/preprocess_sketch.go

+6
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ func (s *ArduinoPreprocessorRunner) Run(ctx *types.Context) error {
105105
return i18n.WrapError(err)
106106
}
107107

108+
if runtime.GOOS == "windows" {
109+
// chdir in the uppermost directory to avoid UTF-8 bug in clang (https://github.com/arduino/arduino-preprocessor/issues/2)
110+
command.Dir = filepath.VolumeName(command.Args[0]) + "/"
111+
//command.Args[0], _ = filepath.Rel(command.Dir, command.Args[0])
112+
}
113+
108114
verbose := ctx.Verbose
109115
if verbose {
110116
fmt.Println(commandLine)

0 commit comments

Comments
 (0)