-
Notifications
You must be signed in to change notification settings - Fork 371
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
Introduce `--confirm-level' option #4582
Conversation
From dev meeting:
|
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.
Priority of the environment variables looks good to me - a couple of questions about the handling of OPAMNO
/OPAMCONFIRMLEVEL
for plugins and a CLI question on conflicting options.
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.
LGTM
for mk_enum_opt_all
I'll take your word on it 😬
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.
Some message change suggestions - I think it's clearer to state exactly how the env vars are interpreted
…to opam questions, and `--no` There is 3 levels, 4 states: * unsafe-yes: yes to all questions & launch system package manager in non interactive mode * yes: answers no to all questions, similar to `--yes` * no: answers no to all questions, similar to `--no` * ask (default): ask for all questions
…ars more than once
… than once. * yes and no, the one in the right is taken * confirm-level, the one in the right is taken * if yes/no & confirm-level are given, take confirm-level
* `{doc,init}_opam_envvariables' -> `{doc,init}_opam_env_variables'
src/core/opamCoreConfig.ml
Outdated
match E.confirmlevel (), E.yes (), E.no () with | ||
| Some c, _, _ -> Some c | ||
| _, Some true, _ -> Some `all_yes | ||
| _, Some false, _ |
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.
| _, Some false, _ | |
| _, Some false, _ -> None |
At present, OPAMYES=false opam ...
still prompts, where this would still answer no.
Add
--confirm-level
to specify levels of automatic answer to opam questions, and--no
There is 3 levels:
--yes
--no
Those values can also be given to environment variable
OPAMCONFIRMLEVEL
.Priorities:
OPAMCONFIRMLEVEL
if defined, thenOPAMYES
if true, thenOPAMNO
if true, kept undefined otherwise--yes
,--no
, and--confirm-level
can be repeated. Only the last of--yes
or--no
is taken into account, and only the last--confirm-level
is taken into account. if--confirm-level
and--yes/no
are both given,--confirm-level
content is taken.