File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ package builder
32
32
import (
33
33
"fmt"
34
34
"path/filepath"
35
+ "runtime"
36
+ "strings"
35
37
36
38
"github.com/arduino/arduino-builder/constants"
37
39
"github.com/arduino/arduino-builder/i18n"
@@ -77,6 +79,16 @@ func (s *ArduinoPreprocessorRunner) Run(ctx *types.Context) error {
77
79
properties .Merge (toolProps )
78
80
properties [constants .BUILD_PROPERTIES_SOURCE_FILE ] = targetFilePath
79
81
if ctx .CodeCompleteAt != "" {
82
+ if runtime .GOOS == "windows" {
83
+ //use relative filepath to avoid ":" escaping
84
+ splt := strings .Split (ctx .CodeCompleteAt , ":" )
85
+ if len (splt ) == 3 {
86
+ //all right, do nothing
87
+ } else {
88
+ splt [1 ] = filepath .Base (splt [0 ] + ":" + splt [1 ])
89
+ ctx .CodeCompleteAt = strings .Join (splt [1 :], ":" )
90
+ }
91
+ }
80
92
properties ["codecomplete" ] = "-output-code-completions=" + ctx .CodeCompleteAt
81
93
} else {
82
94
properties ["codecomplete" ] = ""
You can’t perform that action at this time.
0 commit comments