forked from toolshed/abra
fix: fix: trim comments that are not modifers
See coop-cloud/organising#505
This commit is contained in:
@ -69,9 +69,14 @@ func GeneratePassphrases(count uint) ([]string, error) {
|
||||
// and some times you don't (as the caller). We need to be able to handle the
|
||||
// "app new" case where we pass in the .env.sample and the "secret generate"
|
||||
// case where the app is created.
|
||||
func ReadSecretsConfig(appEnv map[string]string, composeFiles []string, recipeName string) (map[string]string, error) {
|
||||
func ReadSecretsConfig(appEnvPath string, composeFiles []string, recipeName string) (map[string]string, error) {
|
||||
secretConfigs := make(map[string]string)
|
||||
|
||||
appEnv, err := config.ReadEnv(appEnvPath, config.ReadEnvOptions{IncludeModifiers: true})
|
||||
if err != nil {
|
||||
return secretConfigs, err
|
||||
}
|
||||
|
||||
opts := stack.Deploy{Composefiles: composeFiles}
|
||||
config, err := loader.LoadComposefile(opts, appEnv)
|
||||
if err != nil {
|
||||
@ -232,7 +237,7 @@ func PollSecretsStatus(cl *dockerClient.Client, app config.App) (secretStatuses,
|
||||
return secStats, err
|
||||
}
|
||||
|
||||
secretsConfig, err := ReadSecretsConfig(app.Env, composeFiles, app.Recipe)
|
||||
secretsConfig, err := ReadSecretsConfig(app.Path, composeFiles, app.Recipe)
|
||||
if err != nil {
|
||||
return secStats, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user