Load env on download #23

Merged
jolheiser merged 1 commits from download-env into main 2022-06-14 20:20:51 +00:00
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 {