forked from tangled.org/core
this repo has no description

guard: insert identity env vars into git commands

these should be accessible by hooks.

Signed-off-by: oppiliappan <me@oppi.li>

Changed files
+5
guard
+5
guard/guard.go
···
gitCmd.Stdout = os.Stdout
gitCmd.Stderr = os.Stderr
gitCmd.Stdin = os.Stdin
+
gitCmd.Env = append(os.Environ(),
+
fmt.Sprintf("GIT_USER_DID=%s", identity.DID.String()),
+
fmt.Sprintf("GIT_USER_HANDLE=%s", identity.Handle.String()),
+
fmt.Sprintf("GIT_USER_PDS_ENDPOINT=%s", identity.PDSEndpoint()),
+
)
if err := gitCmd.Run(); err != nil {
l.Error("command failed", "error", err)