If a full command with spaces is passed to ktd run my previous change to escape elements will wrap the whole command in quotes, causing it to fail.
As an example ktd run container "python scripts/blah.py --argument" ends up being translated to entrypoint of "'python scripts/blah.py --argument'" (notice double quoting).
This change updates to only shell quote individual elements of a command that is passed in multiple parts.
Purpose of PR
If a full command with spaces is passed to
ktd run
my previous change to escape elements will wrap the whole command in quotes, causing it to fail.As an example
ktd run container "python scripts/blah.py --argument"
ends up being translated to entrypoint of"'python scripts/blah.py --argument'"
(notice double quoting).This change updates to only shell quote individual elements of a command that is passed in multiple parts.