Load env on download
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline was successful Details

Signed-off-by: jolheiser <john.olheiser@gmail.com>
pull/23/head
jolheiser 2022-06-14 15:13:53 -05:00
parent 07ccb51584
commit 3ca36b7817
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
1 changed files with 9 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"fmt"
"strings"
"go.jolheiser.com/tmpl/env"
"go.jolheiser.com/tmpl/registry"
"github.com/rs/zerolog/log"
@ -37,6 +38,14 @@ func runDownload(ctx *cli.Context) error {
return err
}
e, err := env.Load(registryFlag)
if err != nil {
return err
}
if err := e.Set(); err != nil {
return err
}
var source *registry.Source
if sourceFlag != "" {
for _, s := range reg.Sources {