Load env on download (#23)
Co-authored-by: jolheiser <john.olheiser@gmail.com> Reviewed-on: #23pull/24/head v0.2.1
parent
07ccb51584
commit
c348255c37
|
@ -4,6 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"go.jolheiser.com/tmpl/env"
|
||||||
"go.jolheiser.com/tmpl/registry"
|
"go.jolheiser.com/tmpl/registry"
|
||||||
|
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
@ -37,6 +38,14 @@ func runDownload(ctx *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e, err := env.Load(registryFlag)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := e.Set(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
var source *registry.Source
|
var source *registry.Source
|
||||||
if sourceFlag != "" {
|
if sourceFlag != "" {
|
||||||
for _, s := range reg.Sources {
|
for _, s := range reg.Sources {
|
||||||
|
|
Loading…
Reference in New Issue