-
Notifications
You must be signed in to change notification settings - Fork 691
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
append option for user-config command #5008
Conversation
@randen once this is merged we can update the windows installer to call either |
(travis error seems spurious) |
So, if we're updating an already existing config that has an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK. Is --append
hidden from the help output? Or do you think that it should be exposed to users?
@@ -2446,6 +2448,12 @@ userConfigCommand = CommandUI { | |||
"Overwrite the config file if it already exists." | |||
userConfigForce (\v flags -> flags { userConfigForce = v }) | |||
trueArg | |||
, option ['a'] ["append"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd call this --append-lines
. Note that you'll still be able to say --append=foo
, since --append
is an unique prefix.
Actually, it won't have two entries. The semantics of It may be the "right thing" to augment some lines instead of replace them with update semantics, but we'd have to handle this case by case for all config lines, and that seems too broad for this PR. |
As such it might be clearer to name the setting "augment" and change the doc to read "Additional setting to augment the config file (replacing a previous setting if it existed)." It isn't hidden from the help output -- no reason not to expose this to end users, imho. If you agree on the name I'll update the PR. |
Sorry for not reacting earlier, was travelling for work. I haven't managed to come up with a better name, so let's use "augment". |
Should resolve #4901
This adds an additional option for
user-config
, as--append=
or-a
. This can be used multiple times, each time adding a new line to the delta onuser-config
files forinit
update
ordiff
. This lets tools like the platform installer pass in, e.g. msys directories forextra-prog-path
andextra-lib-dirs
etc.Tested on some example files, and new-test passes.