fix: don't clobber recipe changes during `generate`

Closes #255
This commit is contained in:
3wc 2021-11-22 16:11:32 +02:00
parent 9d62fff074
commit 8635922b9f
1 changed files with 9 additions and 0 deletions

View File

@ -134,6 +134,15 @@ A new catalogue copy can be published to the recipes repository by passing the
logrus.Fatal(err)
}
isClean, err := gitPkg.IsClean(rm.Name)
if err != nil {
return
}
if !isClean {
logrus.Fatalf("'%s' has locally unstaged changes", rm.Name)
}
if err := gitPkg.EnsureUpToDate(recipeDir); err != nil {
logrus.Fatal(err)
}