1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-09 13:47:11 +02:00

Fix parsing of 'y/n' when starting in non-repo

This commit is contained in:
Luka Markušić 2022-05-28 16:52:49 +02:00 committed by Jesse Duffield
parent 36aa01c3ac
commit 658a6b239b

View File

@ -172,7 +172,7 @@ func (app *App) setupRepo() (bool, error) {
// Offer to initialize a new repository in current directory.
fmt.Print(app.Tr.CreateRepo)
response, _ := bufio.NewReader(os.Stdin).ReadString('\n')
if strings.Trim(response, " \n") != "y" {
if strings.Trim(response, " \r\n") != "y" {
shouldInitRepo = false
}
} else if notARepository == "skip" {