mirror of
https://github.com/facundoolano/jorge.git
synced 2024-12-25 21:58:28 +01:00
fix post filename already exist handling
This commit is contained in:
parent
6f27afacf7
commit
37f1675edc
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue