Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: setCommand should allow space escaping #9530

Open
ylemoigne opened this issue Nov 14, 2024 · 0 comments
Open

[Enhancement]: setCommand should allow space escaping #9530

ylemoigne opened this issue Nov 14, 2024 · 0 comments

Comments

@ylemoigne
Copy link

Module

Core

Proposal

Currently, GenericContainer.setCommand(String) do a command.split(" ").
This doesn't allow escaping the space. It can be an issue for command lines like postgres -c max_connections=100 -c default_transaction_isolation=repeatable read

The alternative method setCommand(String... commandParts) is not always available, for example, when using testcontainers through quarkus dev-service which doesn't expose a way to set command through array/list of parameters.

As command.split() take a regexp, changing the implementation to command.split("[^\\]? ") should allow user to write postgres -c max_connections=100 -c default_transaction_isolation=repeatable\ read and get correct interpretation.

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

No branches or pull requests

1 participant