From 9bc1a799b0c49cb314193cd60b9d335a20a93c73 Mon Sep 17 00:00:00 2001 From: Timothy Vanderaerden Date: Sun, 26 Jan 2025 07:16:41 +0100 Subject: [PATCH] Fix Json output name when none is set (#337) --- lib/excoveralls/json.ex | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/excoveralls/json.ex b/lib/excoveralls/json.ex index 4e9d8e7..10acca4 100644 --- a/lib/excoveralls/json.ex +++ b/lib/excoveralls/json.ex @@ -35,9 +35,10 @@ defmodule ExCoveralls.Json do end defp output_name(name) do - case name do - nil -> @file_name - name -> "#{name}.json" + if name do + "#{name}.json" + else + @file_name end end