grim/hgkeeper

c10e152f5523
Parents a2db929144c4
Children 1af17fe86235
Use --repos-path to generate on-demand cmdline

So we can avoid special environment case. Also this fixes my installation
as the HGK_REPOS_PATH was not recognized and the default value "repos" without
any absolute path was used.

Reviewed at https://reviews.imfreedom.org/r/2429/
--- a/authorized_keys/command.go Tue Apr 11 21:42:01 2023 -0500
+++ b/authorized_keys/command.go Wed Apr 12 23:21:11 2023 -0500
@@ -30,9 +30,8 @@
}
options := []string{
- fmt.Sprintf("command=\"%s once %s\"", c.HGKeeperExec, username),
+ fmt.Sprintf("command=\"%s --repos-path='%s' once %s\"", c.HGKeeperExec, g.ReposPath, username),
"restrict",
- fmt.Sprintf("environment=\"HGK_REPOS_PATH=%s\"", g.ReposPath),
}
fmt.Printf("%s %s", strings.Join(options, ","), pubkey)