We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c34995b commit d28737dCopy full SHA for d28737d
internal/arduino/builder/cpp/depfile.go
@@ -55,7 +55,7 @@ func ReadDepFile(depFilePath *paths.Path) (*Dependencies, error) {
55
}
56
57
func readDepFile(depFile string) (*Dependencies, error) {
58
- rows, err := unescapeAndSplit(strings.ReplaceAll(depFile, "\r\n", "\n"))
+ rows, err := unescapeAndSplit(depFile)
59
if err != nil {
60
return nil, err
61
@@ -83,6 +83,10 @@ func unescapeAndSplit(s string) ([]string, error) {
83
dollar := false
84
current := strings.Builder{}
85
for _, c := range s {
86
+ if c == '\r' {
87
+ // Ignore CR (Windows line ending style immediately followed by LF)
88
+ continue
89
+ }
90
if backslash {
91
switch c {
92
case ' ':
0 commit comments