nimbella / aio-cli-plugin-runtime

Nimbella Fork of the Adobe I/O Runtime plugin for Apache OpenWhisk.
https://nimbella.com
Apache License 2.0
2 stars 1 forks source link

Aio differs from wsk in value quoting requirements for action invoke ... --param #21

Closed joshuaauerbachwatson closed 2 years ago

joshuaauerbachwatson commented 3 years ago

Given a properly installed action and attention to what is in .wskprops, this works as intended

wsk action invoke mySequence --result --param payload "Over-ripe sushi,\nThe Master\nIs full of regret."

This does not (the \n directives get converted to \\n), causing an incorrect result.

nim action invoke mySequence --param payload "Over-ripe sushi,\nThe Master\nIs full of regret."

(omission of --result is ok since it is deliberately made the default for nim). This workaround is needed for correct behavior

nim action invoke mySequence --param payload '"Over-ripe sushi,\nThe Master\nIs full of regret."'

I think there is little to be gained in deviating from wsk behavior in this particular (some deviations are fine when they have clear advantages). Aio should implement the same semantics as wsk for this case.

If we decide to send this upstream, we should rewrite the failing case not using the nim shell but if we fix this ourselves the goal should be to fix nim (I'm pretty sure the nim outer wrapper is not to blame here ... it is not doing any shell escapes of its own ... but this should be confirmed).

joshuaauerbachwatson commented 2 years ago

Too much of a nit to receive any attention at present. Re-open if and when it is shown to be important enough.