Home

tmpl @main - refs - log -
-
https://git.jolheiser.com/tmpl.git
Template automation
tree log patch
Load env on download (#23) Co-authored-by: jolheiser <john.olheiser@gmail.com> Reviewed-on: https://git.jojodev.com/jolheiser/tmpl/pulls/23
jolheiser <john+jojodev@jolheiser.com>
2 years ago
1 changed files, 9 additions(+), 0 deletions(-)
M cmd/download.go -> cmd/download.go
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
 	}