Rework hash_files to return (str, str) result

This commit is contained in:
Bryan Bennett 2024-03-13 21:42:17 -04:00
parent 98c3131f7f
commit 6b313a6ff6
No known key found for this signature in database
GPG key ID: EE149E4215408DE9
3 changed files with 60 additions and 22 deletions

View file

@ -12,7 +12,14 @@ let main = () => {
switch (Lib.Watches.get()) {
| Ok(watches) =>
let paths = Array.map(~f=watch => watch.path, watches);
let hash = Util.hash_files(paths);
let hash =
switch (Util.hash_files(paths)) {
| Ok(hsh) => hsh
| Error(msg) =>
Printf.eprintf("%s\n", e);
exit(1);
};
let profile = layout_directory ++ "/flake-profile-" ++ hash;
let profile_rc = profile ++ ".rc";