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

Allow config parameters with -Application Par Val in rebar3 shell #2808

Open
peerst opened this issue Jul 10, 2023 · 1 comment
Open

Allow config parameters with -Application Par Val in rebar3 shell #2808

peerst opened this issue Jul 10, 2023 · 1 comment

Comments

@peerst
Copy link

peerst commented Jul 10, 2023

Current behaviour

Rebar3 allows the specification of a config file with the --config option of rebar shell

However it does not allow the specification of individual config key/values on the command line.

Expected behaviour

On erl command line one can specify -Application Par Val to set a config parameter in an application.

So one possibility would be to allow a similar calling option (possibly with --)

Advantage would be to be very similar to what users know from erl

Disadvantage would be the possibilities of application name with existing options.

So maybe rather go with --par Application Par Val

@ferd
Copy link
Collaborator

ferd commented Jul 28, 2023

I've taken a quick look, and I think right now this is the sort of stuff that may be easier to do with the Erlang/OTP parser. I think that the getopt stuff we have has limitations: it does not appear to outright support anything but key/value formats.

We could work around this by going --par=App.Key:Val and parsing stuff out. It is non-standard and a bit odd, but it does seem that getopt supports duplicate values properly so long as we use proplists, so it could work.

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

No branches or pull requests

2 participants