Skip to content

Commit

Permalink
fix single-quote+ParseEnv bug
Browse files Browse the repository at this point in the history
Fixes issues with parsing shell lines with single quotes used to group
things (eg. subshell calls).

Fix was to set `got` state to `argQuoted` as the double quote path used
(and which worked for it).
  • Loading branch information
eikenb committed Jun 3, 2021
1 parent 9927b78 commit 6bc4808
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shellwords.go
Expand Up @@ -232,7 +232,7 @@ loop:
case '\'':
if !doubleQuoted && !dollarQuote {
if singleQuoted {
got = argSingle
got = argQuoted
}
singleQuoted = !singleQuoted
continue
Expand Down

0 comments on commit 6bc4808

Please sign in to comment.