Skip to content

Commit

Permalink
fix: lock creates parent dir if missing
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne Marais <dev@maiste.fr>
  • Loading branch information
maiste committed Sep 3, 2024
1 parent 0d95e7d commit eb124e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dune_pkg/lock_dir.ml
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,9 @@ module Write_disk = struct
in
match Path.(parent (source lock_dir_path_src)) with
| Some parent_dir ->
fun () -> Temp.with_temp_dir ~parent_dir ~prefix:"dune" ~suffix:"lock" ~f:build
fun () ->
Path.mkdir_p parent_dir;
Temp.with_temp_dir ~parent_dir ~prefix:"dune" ~suffix:"lock" ~f:build
| None ->
User_error.raise
[ Pp.textf "Temporary directory can't be created by deriving the lock dir path" ]
Expand Down

0 comments on commit eb124e8

Please sign in to comment.