Skip to content

Commit

Permalink
Run git update-server-info after creating default config
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Nov 18, 2021
1 parent 11e9bca commit b8a71d4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package config

import (
"os/exec"
"path/filepath"
"strings"

"gopkg.in/yaml.v2"
Expand Down Expand Up @@ -170,6 +172,12 @@ func (cfg *Config) createDefaultConfigRepo(yaml string) error {
if err != nil {
return err
}
cmd := exec.Command("git", "update-server-info")
cmd.Dir = filepath.Join(rs.Path, cn)
err = cmd.Run()
if err != nil {
return err
}
} else if err != nil {
return err
}
Expand Down

0 comments on commit b8a71d4

Please sign in to comment.