chore: more logging for env versions

This commit is contained in:
decentral1se 2024-07-17 10:08:32 +02:00
parent ea10019068
commit b2436174b0
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
2 changed files with 8 additions and 1 deletions

View File

@ -599,5 +599,11 @@ func (a App) WriteRecipeVersion(version string) error {
log.Fatal(err)
}
return os.WriteFile(a.Path, []byte(strings.Join(lines, "\n")), os.ModePerm)
if err := os.WriteFile(a.Path, []byte(strings.Join(lines, "\n")), os.ModePerm); err != nil {
log.Fatal(err)
}
log.Infof("version %s saved to %s.env", version, a.Domain)
return nil
}

View File

@ -32,6 +32,7 @@ func (r Recipe) Ensure(chaos bool, offline bool) error {
}
}
if r.Version != "" {
log.Debugf("ensuring version %s", r.Version)
if _, err := r.EnsureVersion(r.Version); err != nil {
return err
}