nrwl-nx-action icon indicating copy to clipboard operation
nrwl-nx-action copied to clipboard

Not possible to send an arg with a space in the value

Open jaydiablo opened this issue 3 years ago • 0 comments

Bug Report

Current behavior

When specifying args that contain a space in the value part of the arg, like so:

args: --alias=test --message="test test test"

The command that will get executed (in this case it's nx affected but seems like it would happen to any command that supports the args property) will end up being something like this:

nx affected --target=build '--alias=test' '--message="test' test 'test"'

This ends up passing the message arg as "test'. I've tried a lot of different variations with quotes and such, but can't seem to get past the space causing an issue (other than sending no space at all).

This seems to be due to the way that this action is splitting the args property here: https://github.com/MansaGroup/nrwl-nx-action/blob/main/src/index.ts#L27

Expected behavior

I'd expect that the above YAML would run a command like so:

nx affected --target=build '--alias=test' '--message="test test test"'

jaydiablo avatar Feb 15 '22 17:02 jaydiablo