Use absolute path when editing with editor - hugo - [fork] hugo port for 9front
(HTM) git clone git@git.drkhsh.at/hugo.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
(DIR) commit 41a3af1a29deb979d24e12d56dd3ef52073d580d
(DIR) parent 78576019cf40b8f3578546c00dca4587f05ad48e
(HTM) Author: John Ku <john.cmyk@gmail.com>
Date: Sun, 13 Dec 2015 19:37:32 -0800
Use absolute path when editing with editor
Fixes #1589
Diffstat:
M create/content.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git 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