mirror of
https://git.sr.ht/~bryan_bennett/flake_env
synced 2025-12-16 14:41:24 +01:00
Rework hash_files to return (str, str) result
This commit is contained in:
parent
98c3131f7f
commit
6b313a6ff6
3 changed files with 60 additions and 22 deletions
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue