From 895a7fe7d6b04c9932c5e5933d23da19a2622a1c Mon Sep 17 00:00:00 2001 From: decentral1se Date: Tue, 15 Apr 2025 10:51:53 +0200 Subject: [PATCH] fix: don't overwrite recipeVersion Fixes https://build.coopcloud.tech/toolshed/abra/2709/1/5 --- cli/app/new.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cli/app/new.go b/cli/app/new.go index 13e9c831..8428b4a7 100644 --- a/cli/app/new.go +++ b/cli/app/new.go @@ -110,12 +110,14 @@ var AppNewCommand = &cobra.Command{ log.Fatal(err) } - head, err := recipe.Head() - if err != nil { - log.Fatalf("failed to retrieve latest commit for %s: %s", recipe.Name, err) - } + if recipeVersion == "" { + head, err := recipe.Head() + if err != nil { + log.Fatalf("failed to retrieve latest commit for %s: %s", recipe.Name, err) + } - recipeVersion = formatter.SmallSHA(head.String()) + recipeVersion = formatter.SmallSHA(head.String()) + } } }