Core: make shlex split an attempt with regular split retry (#4046)

This commit is contained in:
Fabian Dill
2024-10-11 23:24:42 +02:00
committed by GitHub
parent f495bf7261
commit ef4d1e77e3

View File

@@ -1153,7 +1153,10 @@ class CommandProcessor(metaclass=CommandMeta):
if not raw:
return
try:
command = shlex.split(raw, comments=False)
try:
command = shlex.split(raw, comments=False)
except ValueError: # most likely: "ValueError: No closing quotation"
command = raw.split()
basecommand = command[0]
if basecommand[0] == self.marker:
method = self.commands.get(basecommand[1:].lower(), None)