tmpl @main -
refs -
log -
-
https://git.jolheiser.com/tmpl.git
Load env on download (#23)
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Reviewed-on: https://git.jojodev.com/jolheiser/tmpl/pulls/23
diff --git a/cmd/download.go b/cmd/download.go
index 90469dd9fb0fc9569ddd1ee10df2302810a6faa3..f5ce256caeb12f83e53c629657d0e801ea1c5d9d 100644
--- a/cmd/download.go
+++ b/cmd/download.go
@@ -4,6 +4,7 @@ import (
"fmt"
"strings"
+ "go.jolheiser.com/tmpl/env"
"go.jolheiser.com/tmpl/registry"
"github.com/rs/zerolog/log"
@@ -34,6 +35,14 @@ }
reg, err := registry.Open(registryFlag)
if err != nil {
+ return err
+ }
+
+ e, err := env.Load(registryFlag)
+ if err != nil {
+ return err
+ }
+ if err := e.Set(); err != nil {
return err
}