forked from tangled.org/core
Monorepo for Tangled

guard: insert identity env vars into git commands

these should be accessible by hooks.

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

oppi.li 914e0fb5 ea36a904

verified
Changed files
+5
guard
+5
guard/guard.go
··· 159 159 gitCmd.Stdout = os.Stdout 160 160 gitCmd.Stderr = os.Stderr 161 161 gitCmd.Stdin = os.Stdin 162 + gitCmd.Env = append(os.Environ(), 163 + fmt.Sprintf("GIT_USER_DID=%s", identity.DID.String()), 164 + fmt.Sprintf("GIT_USER_HANDLE=%s", identity.Handle.String()), 165 + fmt.Sprintf("GIT_USER_PDS_ENDPOINT=%s", identity.PDSEndpoint()), 166 + ) 162 167 163 168 if err := gitCmd.Run(); err != nil { 164 169 l.Error("command failed", "error", err)