mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
escape single quotes in the command stream so as not to confuse the shlex parser
This commit is contained in:
parent
7a67d3d837
commit
3a58988e4a
@ -107,6 +107,10 @@ def main_loop(t2i,parser,log,infile):
|
|||||||
if command.startswith(('#','//')):
|
if command.startswith(('#','//')):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# before splitting, escape single quotes so as not to mess
|
||||||
|
# up the parser
|
||||||
|
command = command.replace("'","\\'")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
elements = shlex.split(command)
|
elements = shlex.split(command)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user