From 64306be2d61e1db283c7223ab83e51af1eb4a1a9 Mon Sep 17 00:00:00 2001 From: Phani Rithvij Date: Wed, 27 Nov 2024 02:58:17 +0530 Subject: [PATCH] init git config failure -> warn (#392) * init git config failure -> warn Signed-off-by: phanirithvij --- internal/cli/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/cli/main.go b/internal/cli/main.go index 10f272f..4c980fd 100644 --- a/internal/cli/main.go +++ b/internal/cli/main.go @@ -92,13 +92,13 @@ func Initialize(ctx *cli.Context) { "Current git version: " + gitVersion) } - if err := git.InitGitConfig(); err != nil { - log.Fatal().Err(err).Send() - } - homePath := config.GetHomeDir() log.Info().Msg("Data directory: " + homePath) + if err := git.InitGitConfig(); err != nil { + log.Warn().Err(err).Msgf("Failed to change the host's git global config, ensure to add to `safe.directory` the path %s, and `receive.advertisePushOptions` is set to true.", homePath) + } + if err := createSymlink(homePath, ctx.String("config")); err != nil { log.Fatal().Err(err).Msg("Failed to create symlinks") }