Skip to content

Commit

Permalink
Merge pull request #63 from AlayaCare/fixCrash
Browse files Browse the repository at this point in the history
fix crash if we dont specify GOLIAC_SERVER_GIT_REPOSITORY
  • Loading branch information
nzin-alayacare authored Oct 9, 2024
2 parents b0712e4 + 57768cc commit 069ac8b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/goliac_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,13 @@ func (g *GoliacServerImpl) serveApply(forceresync bool) (error, bool) {
repo := config.Config.ServerGitRepository
branch := config.Config.ServerGitBranch

if repo == "" {
return fmt.Errorf("GOLIAC_SERVER_GIT_REPOSITORY env variable not set"), false
}
if branch == "" {
return fmt.Errorf("GOLIAC_SERVER_GIT_BRANCH env variable not set"), false
}

// we are ready (to give local state, and to sync with remote)
g.ready = true

Expand Down

0 comments on commit 069ac8b

Please sign in to comment.