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

Don't do that. Please. #4

Open
AltGr opened this issue Aug 17, 2015 · 0 comments
Open

Don't do that. Please. #4

AltGr opened this issue Aug 17, 2015 · 0 comments

Comments

@AltGr
Copy link
Member

AltGr commented Aug 17, 2015

let cur_switch ~opamroot =
let rex = Re_pcre.regexp "switch: \"([^\"]*)\"" in
let config_lines = File.lines_of_file @@ Opt.default root opamroot / "config" in
List.fold_left
(fun a l ->
try
let substrings = Re_pcre.exec ~rex l in
Re_pcre.get_substring substrings 1
with _ -> a
)
"" config_lines

Either use the opam lib, or ensure to follow the exact semantics. I.e. respect the OPAMSWITCH and similar variables.

What happens if operf-macro is run without proper eval $(opam config env) ?

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

1 participant