File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Sources/SwiftDriver/Driver Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -508,18 +508,21 @@ extension Driver {
508
508
continue
509
509
} else if char. isWhitespace && !quoted {
510
510
// This is unquoted, unescaped whitespace, start a new token.
511
- tokens. append ( token)
512
- token = " "
511
+ if !token. isEmpty {
512
+ tokens. append ( token)
513
+ token = " "
514
+ }
513
515
continue
514
516
}
515
517
516
518
token. append ( char)
517
519
}
518
520
// Add the final token
519
- tokens. append ( token)
521
+ if !token. isEmpty {
522
+ tokens. append ( token)
523
+ }
520
524
521
- // Filter any empty tokens that might be parsed if there's excessive whitespace.
522
- return tokens. filter { !$0. isEmpty }
525
+ return tokens
523
526
}
524
527
525
528
/// Tokenize each line of the response file, omitting empty lines.
You can’t perform that action at this time.
0 commit comments