Skip to content

Commit

Permalink
Merge pull request #44 from nikpivkin/check-hooks
Browse files Browse the repository at this point in the history
fix panic if hooks are not passed
  • Loading branch information
sosedoff authored Jan 21, 2025
2 parents 8fe4d96 + 4a9710e commit 152ed63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (c *Config) Setup() error {
}
}

if c.AutoHooks == true {
if c.AutoHooks && c.Hooks != nil {
return c.setupHooks()
}

Expand Down
2 changes: 1 addition & 1 deletion ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (s *SSH) handleConnection(keyID string, chans <-chan ssh.NewChannel) {
return
}

if !repoExists(filepath.Join(s.config.Dir, gitcmd.Repo)) && s.config.AutoCreate == true {
if !repoExists(filepath.Join(s.config.Dir, gitcmd.Repo)) && s.config.AutoCreate {
err := initRepo(gitcmd.Repo, s.config)
if err != nil {
logError("repo-init", err)
Expand Down

0 comments on commit 152ed63

Please sign in to comment.