rundeck-plugins / kubernetes

52 stars 59 forks source link

Strip before splitting container commands by whitespace #119

Closed GuyCarmy closed 2 years ago

GuyCarmy commented 2 years ago

Strip strings of container commands before splitting by whitespace. A trailing whitespace will result an extra empty argument which will then be parsed to a newline on the pod yaml and prevent the container from getting its arguments (if provided from the container args field). A leading whitespace will result in the command itself being parsed as an argument.

ps. I remove trailing whitespace on save, so the PR include some cleanups of unrelated code.