Skip to content

Commit

Permalink
[WIN] Launch arduino-preprocessor from volume name path
Browse files Browse the repository at this point in the history
  • Loading branch information
facchinm authored and cmaglie committed Jan 10, 2018
1 parent dcce66b commit 7de76a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions preprocess_sketch.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ func (s *ArduinoPreprocessorRunner) Run(ctx *types.Context) error {
return i18n.WrapError(err)
}

if runtime.GOOS == "windows" {
// chdir in the uppermost directory to avoid UTF-8 bug in clang (https://github.com/arduino/arduino-preprocessor/issues/2)
command.Dir = filepath.VolumeName(command.Args[0]) + "/"
//command.Args[0], _ = filepath.Rel(command.Dir, command.Args[0])
}

verbose := ctx.Verbose
if verbose {
fmt.Println(commandLine)
Expand Down

0 comments on commit 7de76a9

Please sign in to comment.