fix: fix: trim comments that are not modifers

See coop-cloud/organising#505
This commit is contained in:
2023-10-09 14:37:20 +02:00
parent be693e9df0
commit c249c6ae9c
11 changed files with 71 additions and 22 deletions

View File

@ -221,7 +221,7 @@ func Get(recipeName string, offline bool) (Recipe, error) {
}
envSamplePath := path.Join(config.RECIPES_DIR, recipeName, ".env.sample")
sampleEnv, err := config.ReadEnv(envSamplePath)
sampleEnv, err := config.ReadEnv(envSamplePath, config.ReadEnvOptions{})
if err != nil {
return Recipe{}, err
}
@ -249,9 +249,9 @@ func Get(recipeName string, offline bool) (Recipe, error) {
}, nil
}
func (r Recipe) SampleEnv() (map[string]string, error) {
func (r Recipe) SampleEnv(opts config.ReadEnvOptions) (map[string]string, error) {
envSamplePath := path.Join(config.RECIPES_DIR, r.Name, ".env.sample")
sampleEnv, err := config.ReadEnv(envSamplePath)
sampleEnv, err := config.ReadEnv(envSamplePath, opts)
if err != nil {
return sampleEnv, fmt.Errorf("unable to discover .env.sample for %s", r.Name)
}