fix: don't overwrite recipeVersion
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

Fixes https://build.coopcloud.tech/toolshed/abra/2709/1/5
This commit is contained in:
decentral1se 2025-04-15 10:51:53 +02:00
parent 742a726778
commit 895a7fe7d6
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410

View File

@ -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())
}
}
}