Use absolute path when editing with editor

Fixes #1589
This commit is contained in:
John Ku authored and Anthony Fok committed 2015-12-16 00:00:05 -07:00
1 parent 78576019cf
commit 41a3af1a29
1 file changed
+1 -1
+1 -1
View File
@@ -115,7 +115,7 @@ func NewContent(kind, name string) (err error) {
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