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 58fc63d commit c5364e9Copy full SHA for c5364e9
library/src/scala/sys/process/Parser.scala
@@ -94,12 +94,14 @@ private[scala] object Parser {
94
res
95
}
96
def badquote() = errorFn(s"Unmatched quote [${qpos.last}](${line.charAt(qpos.last)})")
97
+ def badescape() = errorFn("trailing backslash")
98
99
@tailrec def loop(): List[String] = {
100
skipWhitespace()
101
start = pos
102
if (done) accum.reverse
- else if (!skipToDelim()) { badquote() ; Nil }
103
+ else if (!skipToDelim()) { badquote(); Nil }
104
+ else if (pos > line.length) { badescape(); Nil }
105
else {
106
accum ::= text()
107
loop()
0 commit comments