From 33aa9228e2ae8c8b915937ce78c0f43d0a5f5c7f Mon Sep 17 00:00:00 2001 From: Bryan Bennett Date: Tue, 18 Jun 2024 06:53:53 -0400 Subject: [PATCH] Update doc comments --- lib/flake_env__util.re | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/flake_env__util.re b/lib/flake_env__util.re index e471010..454870d 100644 --- a/lib/flake_env__util.re +++ b/lib/flake_env__util.re @@ -1,8 +1,8 @@ open Core; module Unix = Core_unix; +/*** Run a process [name] with args [args], returning (exit_code, stdout text) */ let run_process = (name, args) => { - /*** Run a process [name] with args [args], returning (exit_code, stdout text) */ let stdout_chan = Unix.open_process_in(name ++ " " ++ (args |> String.concat(~sep=" "))); let stdout_content = stdout_chan |> In_channel.input_all; @@ -10,6 +10,7 @@ let run_process = (name, args) => { (exit_code, stdout_content); }; +/*** Run nix with some fixed arguments, appending a user provided set of arguments. */ let nix = args => run_process( "nix", @@ -17,7 +18,7 @@ let nix = args => ); let hash_files = filenames => { - /*** Hash all entries in [filenames] + /*** Hash all entries in [filenames] which represent existing files. Returns Some(hex-string) or None if no filenames are found. */ let ctx = Sha1.init(); @@ -27,7 +28,6 @@ let hash_files = filenames => { switch (Sys_unix.file_exists(f)) { | `Yes => true | _ => - // let fullpth = Filename_unix.realpath(f); Printf.eprintf( "Cannot find file %s (cwd: %s)\n", f, @@ -53,6 +53,7 @@ let hash_files = filenames => { }; let rec rmrf = path => { + /*** Remove [path] recursively */ switch (Unix.lstat(path).st_kind) { | exception (Unix.Unix_error(_, _, _)) => () | S_REG