forked from toolshed/abra
fix: secrets from config, --offline/chaos handling, typos
See coop-cloud/organising#464
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user