shithub: hugo

Download patch

ref: 41a3af1a29deb979d24e12d56dd3ef52073d580d
parent: 78576019cf40b8f3578546c00dca4587f05ad48e
author: John Ku <[email protected]>
date: Sun Dec 13 14:37:32 EST 2015

Use absolute path when editing with editor

Fixes #1589

--- a/create/content.go
+++ b/create/content.go
@@ -115,7 +115,7 @@
 	if editor != "" {
 		jww.FEEDBACK.Printf("Editing %s in %s.\n", name, editor)
 
-		cmd := exec.Command(editor, path.Join(viper.GetString("contentDir"), name))
+		cmd := exec.Command(editor, helpers.AbsPathify(path.Join(viper.GetString("contentDir"), name)))
 		cmd.Stdin = os.Stdin
 		cmd.Stdout = os.Stdout
 		cmd.Stderr = os.Stderr