Load env on download (#23)
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details

Co-authored-by: jolheiser <john.olheiser@gmail.com>
Reviewed-on: #23
pull/24/head v0.2.1
jolheiser 2022-06-14 20:20:51 +00:00
parent 07ccb51584
commit c348255c37
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 {