search for: dir_sep

Displaying 4 results from an estimated 4 matches for "dir_sep".

Did you mean: dir_seen
2017 Mar 22
2
Re: [PATCH 4/5] dib: require a Python interpreter
On Wed, Mar 22, 2017 at 11:19:49AM +0100, Pino Toscano wrote: > if elements = [] && machine_readable then ( > @@ -246,6 +252,19 @@ read the man page virt-dib(1). > if elements = [] then > error (f_"at least one distribution root element must be specified"); > > + let python = > + match python with > + | Some exe -> > + let p
2019 Jan 11
3
[PATCH 1/3] mlstdutils: add a very simple test for Std_utils.which
--- common/mlstdutils/std_utils_tests.ml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/mlstdutils/std_utils_tests.ml b/common/mlstdutils/std_utils_tests.ml index 81f512cbf..f7b0247a4 100644 --- a/common/mlstdutils/std_utils_tests.ml +++ b/common/mlstdutils/std_utils_tests.ml @@ -29,6 +29,11 @@ let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
2017 Mar 22
0
Re: [PATCH 4/5] dib: require a Python interpreter
...t; + if Filename.is_relative exe then > > IIUC what you mean here is "the 'exe' filename doesn't contain > any slashes"? That isn't what is written above. Yes, sort of. What about something like: let p = try ignore (String.find exe Filename.dir_sep); Unix.access exe [Unix.X_OK]; exe with | Not_found -> get_required_tool exe in Thanks, -- Pino Toscano
2019 Jan 11
0
[PATCH 3/3] OCaml: use the new behaviour of Std_utils.which
...l +++ b/dib/cmdline.ml @@ -251,17 +251,7 @@ read the man page virt-dib(1). if elements = [] then error (f_"at least one distribution root element must be specified"); - let python = - match python with - | Some exe -> - let p = - if String.find exe Filename.dir_sep <> -1 then ( - Unix.access exe [Unix.X_OK]; - exe - ) else - get_required_tool exe in - Some p - | None -> None in + let python = Option.map get_required_tool python in { debug = debug; basepath = basepath; elements = elements; excluded_...