File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -58,31 +58,31 @@ func (h *GitopiaHandler) Initialize(remote *core.Remote) error {
5858 // Check existing configuration
5959 grpcHost , _ := config .GitConfigGet (config .GitopiaConfigGRPCHostOption )
6060 tmAddr , _ := config .GitConfigGet (config .GitopiaConfigTmAddrOption )
61-
61+
6262 // Validate and configure gRPC and RPC hosts
6363 needsReconfiguration := false
6464 if grpcHost == "" || tmAddr == "" || ! api .CheckGRPCHostLiveness (grpcHost ) || ! api .CheckRPCHostLiveness (tmAddr ) {
6565 needsReconfiguration = true
6666 }
67-
67+
6868 if needsReconfiguration {
6969 remote .Logger .Printf ("Configuring Gitopia hosts..." )
7070 provider := api .GetBestApiProvider ()
7171 grpcHost = provider .GRPCHost
7272 tmAddr = provider .TMAddr
73-
73+
7474 if err := api .SetConfiguredGRPCHost (provider .GRPCHost ); err != nil {
7575 return err
7676 }
77-
77+
7878 if err := api .SetConfiguredTmAddr (provider .TMAddr ); err != nil {
7979 return err
8080 }
8181 }
8282
8383 // Check and configure Git server host
8484 gitServerHost , _ := config .GitConfigGet (config .GitopiaConfigGitServerHostOption )
85-
85+
8686 if gitServerHost == "" || ! api .CheckGitServerHostLiveness (gitServerHost ) {
8787 gitServerHost = api .GetBestGitServerHost (grpcHost )
8888 if gitServerHost != "" {
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ func GetLocalDir() (string, error) {
3232func GitCommand (name string , args ... string ) * exec.Cmd {
3333 cmd := exec .Command (name , args ... )
3434 cmd .Env = os .Environ ()
35- cmd .Stdout = os .Stdout
35+ // Redirect stdout to stderr to avoid protocol communication issues
36+ cmd .Stdout = os .Stderr
3637 cmd .Stderr = os .Stderr
3738
3839 return cmd
You can’t perform that action at this time.
0 commit comments