summaryrefslogtreecommitdiff
path: root/lib/manifest.ml
diff options
context:
space:
mode:
authorยท๐‘‘๐‘ด๐‘•๐‘‘๐‘ฉ๐‘ค2025-12-11 08:10:56 +0000
committerยท๐‘‘๐‘ด๐‘•๐‘‘๐‘ฉ๐‘ค2025-12-11 08:10:56 +0000
commitb9d2d2eabedd6745eda4cb15270994e939d6b1b5 (patch)
tree6fc8d3710329647ac83035a0bcca8d6778a9d156 /lib/manifest.ml
parentd89adc67dabe858ef1de35a289d36c51bac37714 (diff)
downloadnixtaml-b9d2d2eabedd6745eda4cb15270994e939d6b1b5.tar
nixtaml-b9d2d2eabedd6745eda4cb15270994e939d6b1b5.tar.gz
nixtaml-b9d2d2eabedd6745eda4cb15270994e939d6b1b5.tar.bz2
nixtaml-b9d2d2eabedd6745eda4cb15270994e939d6b1b5.tar.lz
nixtaml-b9d2d2eabedd6745eda4cb15270994e939d6b1b5.tar.xz
nixtaml-b9d2d2eabedd6745eda4cb15270994e939d6b1b5.tar.zst
nixtaml-b9d2d2eabedd6745eda4cb15270994e939d6b1b5.zip
manifest git fix bool nodes
Diffstat (limited to 'lib/manifest.ml')
-rw-r--r--lib/manifest.ml23
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/manifest.ml b/lib/manifest.ml
index 370dc27..f987859 100644
--- a/lib/manifest.ml
+++ b/lib/manifest.ml
@@ -186,20 +186,31 @@ module Git = struct
let* git = ll @@ kdl.@(node "git") in
let+ repository = Template.of_child ~name: "repository" git
and+ mirrors = Template.of_mirrors git
+ and+ reference = Reference.codec.of_kdl git.children
and+ submodules =
ll @@
- match git.@(child "submodules" // arg 0 // bool_value) with
- | Ok sms -> Ok sms
+ match git.@(child "submodules") with
+ | Ok sms ->
+ begin
+ match sms.@(arg 0 // bool_value) with
+ | Ok smb -> Ok smb
+ | Error (`Missing_index 0) -> Ok true
+ | Error err -> Error err
+ end
| Error (`Not_found ("submodules", _)) -> Ok false
| Error err -> Error err
and+ lfs =
ll @@
- match git.@(child "lfs" // arg 0 // bool_value) with
- | Ok sms -> Ok sms
+ match git.@(child "lfs") with
+ | Ok sms ->
+ begin
+ match sms.@(arg 0 // bool_value) with
+ | Ok smb -> Ok smb
+ | Error (`Missing_index 0) -> Ok true
+ | Error err -> Error err
+ end
| Error (`Not_found ("lfs", _)) -> Ok false
| Error err -> Error err
- and+ reference =
- Reference.codec.of_kdl git.children
in
{repository; mirrors; reference; submodules; lfs}
);