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

Clarify the acceptable values for OPAMVERBOSE #5754

Open
smorimoto opened this issue Dec 7, 2023 · 1 comment
Open

Clarify the acceptable values for OPAMVERBOSE #5754

smorimoto opened this issue Dec 7, 2023 · 1 comment

Comments

@smorimoto
Copy link
Member

smorimoto commented Dec 7, 2023

As far as I know, they are not documented at the moment. Actually, if you follow the implementation, you will get here:

opam/src/core/opamStd.ml

Lines 1670 to 1674 in bb1400b

let bool_of_string s =
match String.lowercase_ascii s with
| "" | "0" | "no" | "false" -> Some false
| "1" | "yes" | "true" -> Some true
| _ -> None

@rjbou rjbou added the AREA: UI label Dec 7, 2023
@rjbou
Copy link
Collaborator

rjbou commented Dec 7, 2023

There is documentaiton in the manpage, that is a redirection ftm:

OPAMVERBOSE see option `--verbose'.

leading to

-v, --verbose
  Be  more verbose. One -v shows all package commands, repeat to also display commands 
  called internally (e.g. tar, curl, patch, etc.) Repeating n times is equivalent to 
  setting $OPAMVERBOSE to "n".

The used function is

opam/src/core/opamStd.ml

Lines 1682 to 1689 in 44d7bd9

let env_level var =
env (function s ->
if s = "" then 0 else
match bool_of_string s with
| Some true -> 0
| Some false -> 1
| None -> int_of_string s)
var

We could add something like "takes an integer from 0, for more details, see --verbose", in order to precise what is the type of the input, and not introduce repetition.

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

3 participants