Skip to content

Commit

Permalink
fix: don't set ImageName if ImagePath is empty
Browse files Browse the repository at this point in the history
Signed-off-by: nιcнolaѕ wιlde <[email protected]>
  • Loading branch information
nicholaswilde committed Jul 16, 2022
1 parent a7d5246 commit bb16cce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cook/recipe_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ func MergeRecipeData(recipeInfo RecipeDocumentationInfo, recipeData *cooklang.Re

recipeData.Metadata["title"] = recipeInfo.RecipeName

recipeData.Metadata["ImageName"] = filepath.Base(recipeInfo.ImagePath)
if len(recipeInfo.ImagePath) > 0 {
recipeData.Metadata["ImageName"] = filepath.Base(recipeInfo.ImagePath)
}

return recipeData
}

0 comments on commit bb16cce

Please sign in to comment.