Skip to content

Conversation

@nytoan
Copy link
Contributor

@nytoan nytoan commented Sep 29, 2025

When using Command in the config file, the command doesn't support operators like |, &&, >.

If i want to do something like that :

{ Command = "kubectl get secrets -n namespace my-sql-credentials -o jsonpath={.data.PGPASSWORD} | base64 -d | jq -sRr @uri", SaveOutputTo = 'password' },

it throw a parse error because there is a pipe.

The solution is to run the command with a shell.

@jorgerojas26
Copy link
Owner

why don't just use a shell as part of the command?

@nytoan
Copy link
Contributor Author

nytoan commented Oct 28, 2025

Hi Jorge,

Sadly It does not work using a shell because of the parts := strings.Fields(command). Using a shell requires to be able to give all the command in one string.

@jorgerojas26
Copy link
Owner

Hi,

i don't think it is a good idea to hardcode running a shell for all commands, maybe try to find a way to make it so it is part of the user input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants