forked from toolshed/abra
refactor(recipe): use method or variable for .env.sample
This commit is contained in:
@ -2,15 +2,12 @@ package recipe
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path"
|
||||
|
||||
"coopcloud.tech/abra/pkg/config"
|
||||
"coopcloud.tech/abra/pkg/envfile"
|
||||
)
|
||||
|
||||
func (r Recipe2) SampleEnv() (map[string]string, error) {
|
||||
envSamplePath := path.Join(config.RECIPES_DIR, r.Name, ".env.sample")
|
||||
sampleEnv, err := envfile.ReadEnv(envSamplePath)
|
||||
sampleEnv, err := envfile.ReadEnv(r.SampleEnvPath)
|
||||
if err != nil {
|
||||
return sampleEnv, fmt.Errorf("unable to discover .env.sample for %s", r.Name)
|
||||
}
|
||||
|
Reference in New Issue
Block a user