[core/input] Invoke commands in a subshell

add shell capability to util.cli and make sure that the input module
uses that to reliably spawn whatever command the user wants to run.

see #628
This commit is contained in:
tobi-wan-kenobi 2020-05-16 11:41:34 +02:00
parent 06fa453d71
commit eea3c758de
3 changed files with 8 additions and 3 deletions

View file

@ -70,7 +70,9 @@ class config(unittest.TestCase):
self.inputObject, self.someEvent["button"], self.someCommand
)
core.input.trigger(self.someEvent)
cli.execute.assert_called_once_with(self.someCommand, wait=False)
cli.execute.assert_called_once_with(
self.someCommand, wait=False, shell=True
)
def test_non_existent_callback(self):
with unittest.mock.patch("core.input.util.cli") as cli: