We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79b9a25 commit 83e2915Copy full SHA for 83e2915
src/dune_pkg/lock_dir.ml
@@ -1391,9 +1391,14 @@ module Write_disk = struct
1391
| Ok `Non_existant -> Fun.const ()
1392
| Ok `Is_existing_lock_dir ->
1393
fun () ->
1394
- (* dev-tool lock dirs are external paths despite living in _build, they're
1395
- safe to remove *)
1396
- Path.rm_rf ~allow_external:true path
+ let path =
+ match path with
+ | In_source_tree _ | In_build_dir _ -> path
1397
+ | External e ->
1398
+ (* it might be a dev-tool path, try to convert *)
1399
+ Workspace.dev_tool_path_to_source_dir e |> Path.source
1400
+ in
1401
+ Path.rm_rf path
1402
| Error e -> raise_user_error_on_check_existance path e
1403
;;
1404
0 commit comments