fix: secrets from config, --offline/chaos handling, typos

See coop-cloud/organising#464
This commit is contained in:
2023-09-25 10:31:59 +02:00
parent f3ded88ed8
commit d02f659bf8
8 changed files with 235 additions and 112 deletions

View File

@ -249,6 +249,15 @@ func Get(recipeName string, offline bool) (Recipe, error) {
}, nil
}
func (r Recipe) SampleEnv() (map[string]string, error) {
envSamplePath := path.Join(config.RECIPES_DIR, r.Name, ".env.sample")
sampleEnv, err := config.ReadEnv(envSamplePath)
if err != nil {
return sampleEnv, fmt.Errorf("unable to discover .env.sample for %s", r.Name)
}
return sampleEnv, nil
}
// EnsureExists ensures that a recipe is locally cloned
func EnsureExists(recipeName string) error {
recipeDir := path.Join(config.RECIPES_DIR, recipeName)