From 37f1675edc2d32a465dcc33b7c6b0648bfbb0c3e Mon Sep 17 00:00:00 2001 From: facundoolano Date: Tue, 27 Feb 2024 12:25:03 -0300 Subject: [PATCH] fix post filename already exist handling --- commands/post.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/post.go b/commands/post.go index b6d58a8..eb055ea 100644 --- a/commands/post.go +++ b/commands/post.go @@ -58,9 +58,9 @@ func (cmd *Post) Run(ctx *kong.Context) error { // if file already exists, prompt user for a different one if _, err := os.Stat(path); err == nil { - fmt.Printf("%s already exists\n", path) + fmt.Printf("%s already exists, choose another path\n", path) filename = Prompt("filename") - path = filepath.Join(config.SrcDir, filename) + path = filepath.Join(filename) } // initialize the post front matter