init git config failure -> warn (#392)

* init git config failure -> warn

Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
This commit is contained in:
Phani Rithvij 2024-11-27 02:58:17 +05:30 committed by GitHub
parent 8543f3adfa
commit 64306be2d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -92,13 +92,13 @@ func Initialize(ctx *cli.Context) {
"Current git version: " + gitVersion) "Current git version: " + gitVersion)
} }
if err := git.InitGitConfig(); err != nil {
log.Fatal().Err(err).Send()
}
homePath := config.GetHomeDir() homePath := config.GetHomeDir()
log.Info().Msg("Data directory: " + homePath) 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 { if err := createSymlink(homePath, ctx.String("config")); err != nil {
log.Fatal().Err(err).Msg("Failed to create symlinks") log.Fatal().Err(err).Msg("Failed to create symlinks")
} }