[#3439] Execute plugin fails to run on Windows

Fixed TypeError: a bytes-like object is required, not 'str'
This commit is contained in:
scudre 2020-11-14 17:12:32 -08:00 committed by Calum Lind
parent 610a1bb313
commit 9c90136f57

View File

@ -135,7 +135,7 @@ class Core(CorePluginBase):
]
if windows_check():
# Escape ampersand on windows (see #2784)
cmd_args = [cmd_arg.replace('&', '^^^&') for cmd_arg in cmd_args]
cmd_args = [cmd_arg.replace(b'&', b'^^^&') for cmd_arg in cmd_args]
if os.path.isfile(command) and os.access(command, os.X_OK):
log.debug('Running %s with args: %s', command, cmd_args)