From 47b1b0fc19aa7f4cd5a55d2726b9319b0145c0ba Mon Sep 17 00:00:00 2001 From: David Barroso Date: Sun, 17 Sep 2023 13:23:31 +0200 Subject: [PATCH] fix: add newline when appending to gitignore (#772) --- cmd/project/init.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/project/init.go b/cmd/project/init.go index 5f7ce754e..51edb3459 100644 --- a/cmd/project/init.go +++ b/cmd/project/init.go @@ -88,11 +88,11 @@ func initInit( } defer gitingoref.Close() - if err := system.AddToGitignore(".secrets"); err != nil { + if err := system.AddToGitignore(".secrets\n"); err != nil { return fmt.Errorf("failed to add secrets to .gitignore: %w", err) } - if err := system.AddToGitignore(".nhost"); err != nil { + if err := system.AddToGitignore(".nhost\n"); err != nil { return fmt.Errorf("failed to add .nhost to .gitignore: %w", err) }