defend against spawn TypeError: sequence item 2: expected str instance, list found

This commit is contained in:
Paul Gauthier 2024-09-04 09:06:17 -07:00
parent c4e4967691
commit 8cd2f0ef71

View file

@ -766,7 +766,12 @@ class Commands:
if not args and self.coder.test_cmd: if not args and self.coder.test_cmd:
args = self.coder.test_cmd args = self.coder.test_cmd
if not args:
return
if not callable(args): if not callable(args):
if type(args) is not str:
raise ValueError(repr(args))
return self.cmd_run(args, True) return self.cmd_run(args, True)
errors = args() errors = args()