You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible to specify a value for a parameter/credential as a command using the command source. However, this command string will eventually be split on spaces, i.e. not allowing for any complex commands with shell split semantics (quoting etc), making it hard to do anything more advanced than simply a command with arguments.
Sometimes you might want to clean up the data coming from a specific command, e.g. piping to tr or sed. This is possible when using an external script file, but then the requirements becomes that all users using that parameter/credential set will have to have the script file available.
If supporting list as a type to the command source, it would become more flexible in which parts of the command are arguments and that they are not necessarily space-separated, e.g. sh -c "echo hello world" would be specified as [sh, -c, echo hello world], while today this is interpreted as (using the same semantics): [sh, -c, "echo, hello, world"].
It's possible to specify a value for a parameter/credential as a command using the
command
source. However, this command string will eventually be split on spaces, i.e. not allowing for any complex commands with shell split semantics (quoting etc), making it hard to do anything more advanced than simply a command with arguments.Sometimes you might want to clean up the data coming from a specific command, e.g. piping to
tr
orsed
. This is possible when using an external script file, but then the requirements becomes that all users using that parameter/credential set will have to have the script file available.If supporting list as a type to the
command
source, it would become more flexible in which parts of the command are arguments and that they are not necessarily space-separated, e.g.sh -c "echo hello world"
would be specified as[sh, -c, echo hello world]
, while today this is interpreted as (using the same semantics):[sh, -c, "echo, hello, world"]
.The culprit end up being at https://github.com/cnabio/cnab-go/blob/main/secrets/host/host.go#L53-L53.
The text was updated successfully, but these errors were encountered: