Fix quoting for CommandViewer

This commit is contained in:
Mihail Shinder 2021-11-19 13:38:09 +02:00
parent fd02b12561
commit 3500c00de2
No known key found for this signature in database
GPG Key ID: C89443B0B525978E

View File

@ -278,7 +278,7 @@ class CommandViewer(Viewer):
command = options["command"] command = options["command"]
if not isinstance(command, str): if not isinstance(command, str):
raise TypeError(f"'command' must be 'str' not '{type(command)}'") raise TypeError(f"'command' must be 'str' not '{type(command)}'")
values = {"file": file, **options} values = {"file": quote(file), **options}
return command.format(values) return command.format(values)