Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/dockerfile.ml
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,9 @@ let layers (t : t) : int =
| `From _ | `Run _ | `Copy _ | `Add _ -> true
| _ -> false
in
List.fold_left (fun acc l -> if is_layer l then acc + 1 else acc) 0 t
List.fold_left
(fun acc l ->
match l with `From _ -> 1 | _ -> if is_layer l then acc + 1 else acc)
0 t

let pp ppf tl = Fmt.pf ppf "%s" (string_of_t tl)