Closed warownia1 closed 4 years ago
When the quotes are present in the command argument definition string interpolation and splitting gives weird results due to: $(value) = "my value" then shlex.quote(value) -> "'my value'"
$(value) = "my value"
shlex.quote(value) -> "'my value'"
--option $(value)
['--option', 'my value']
"--option $(value)
['--option \'my value\'']
['--option my value']
'--option $(value)'
['--option my', 'value']
issue
When the quotes are present in the command argument definition string interpolation and splitting gives weird results due to:
$(value) = "my value"
thenshlex.quote(value) -> "'my value'"
result
--option $(value)
gives['--option', 'my value']
(correct)"--option $(value)
gives['--option \'my value\'']
expected['--option my value']
'--option $(value)'
gives['--option my', 'value']
expected['--option my value']