The following code seems not to do anything as the return value is the same for matches within " and without.
|
// Preserve the double quotes around arguments |
Furthermore this code doesn't support flags which have more than one value (e.g., --mtaDeployParameters of step cloudFoundryDeploy).
I tried to specify the --mtaDeployParameters but the arguments are not correctly propagated to the piper binary call.
I either got a list of invalid flags for the piper binary like -f, --version-rule, 'ALL' or their are wrapped inside " like "-f --version-rule ALL --skip-testing-phase --delete-services" which cannot be handled by the cf deploy command executed by piper cloudFoundryDeploy.
I am not sure why it is important to preserve the " in the argument value.
Maybe it makes sense to use a library like minimist for proper command line option parsing.