Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/create
diff options
context:
space:
mode:
authorJohn Ku <john.cmyk@gmail.com>2015-12-14 06:37:32 +0300
committerAnthony Fok <foka@debian.org>2015-12-16 10:00:05 +0300
commit41a3af1a29deb979d24e12d56dd3ef52073d580d (patch)
tree103546f39baf4958a44e4c7e0d425629c47912eb /create
parent78576019cf40b8f3578546c00dca4587f05ad48e (diff)
Use absolute path when editing with editor
Fixes #1589
Diffstat (limited to 'create')
-rw-r--r--create/content.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/create/content.go b/create/content.go
index 98be0e871..e56c5c951 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