This repository was archived by the owner on Feb 16, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -446,24 +446,22 @@ func NewOsEnvSource(osEnv map[string]string) *OsEnv {
446446
447447// Env returns a map of key value pairs with the secrets configured with the
448448// secrethub:// syntax.
449- func (env * OsEnv ) Env (secrets map [string ]string , _ tpl.SecretReader ) (map [string ]string , error ) {
449+ func (env * OsEnv ) Env (_ map [string ]string , secretReader tpl.SecretReader ) (map [string ]string , error ) {
450450 envVarsWithSecrets := make (map [string ]string )
451451 for key , path := range env .envVars {
452- envVarsWithSecrets [key ] = secrets [path ]
452+ secret , err := secretReader .ReadSecret (path )
453+ if err != nil {
454+ return nil , err
455+ }
456+ envVarsWithSecrets [key ] = secret
453457 }
454458 return envVarsWithSecrets , nil
455459}
456460
457461// Secrets returns a slice of secrets used in the environment, namely the ones
458462// configured with the secrethub:// syntax.
459463func (env * OsEnv ) Secrets () []string {
460- secrets := make ([]string , len (env .envVars ))
461- i := 0
462- for _ , path := range env .envVars {
463- secrets [i ] = path
464- i ++
465- }
466- return secrets
464+ return nil
467465}
468466
469467// EnvFile contains an environment that is read from a file.
You can’t perform that action at this time.
0 commit comments