--- a/setup/command.go Thu Apr 18 15:25:12 2019 -0500
+++ b/setup/command.go Thu Apr 18 15:26:05 2019 -0500
@@ -8,7 +8,7 @@
"bitbucket.org/rw_grim/hgkeeper/hg"
-type SetupCommand struct {
AdminRepo string `kong:"flag,name='admin-repo',default='hgkeeper',help='the name of the admin repo to create'"`
@@ -27,7 +27,7 @@
-func (c *SetupCommand) Run(reposPath string) error {
+func (c *Command) Run(reposPath string) error { c.adminRepoPath = filepath.Join(reposPath, c.AdminRepo)
@@ -45,7 +45,7 @@
-func (c *SetupCommand) createReposDir(reposPath string) error {
+func (c *Command) createReposDir(reposPath string) error { if _, err := os.Stat(reposPath); os.IsNotExist(err) {
err := os.MkdirAll(reposPath, 0755)
@@ -56,7 +56,7 @@
-func (c *SetupCommand) createAdminRepo(reposPath string) error {
+func (c *Command) createAdminRepo(reposPath string) error { repo, err := hg.NewRepository(c.adminRepoPath)