From: John Ku Date: Mon, 14 Dec 2015 03:37:32 +0000 (-0800) Subject: Use absolute path when editing with editor X-Git-Tag: v0.16~518 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=41a3af1a;p=brevno-suite%2Fhugo Use absolute path when editing with editor Fixes #1589 --- diff --git a/create/content.go b/create/content.go index 98be0e87..e56c5c95 100644 --- a/create/content.go +++ b/create/content.go @@ -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