From 14dace1cc888f257ca6c6b97a81b97c4ae3008c3 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 19 Jul 2016 16:47:53 +0100 Subject: [PATCH] fix "The system cannot find the file specified." --- installer/installer.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/installer/installer.go b/installer/installer.go index aa496a58..dc593149 100644 --- a/installer/installer.go +++ b/installer/installer.go @@ -31,12 +31,13 @@ func GetPath() string { initializeVariables() var err error + var hugoPath string found := false // Check if Hugo is already on $PATH - if hugo, err = exec.LookPath("hugo"); err == nil { + if hugoPath, err = exec.LookPath("hugo"); err == nil { if checkVersion() { - return hugo + return hugoPath } found = true @@ -100,6 +101,7 @@ func GetPath() string { // Copy the file fmt.Print("Moving Hugo executable... ") + err = files.CopyFile(exetorename, hugo) if err != nil { fmt.Println(err)