mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
fix "The system cannot find the file specified."
This commit is contained in:
parent
32158d6ecb
commit
14dace1cc8
@ -31,12 +31,13 @@ func GetPath() string {
|
|||||||
initializeVariables()
|
initializeVariables()
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
|
var hugoPath string
|
||||||
found := false
|
found := false
|
||||||
|
|
||||||
// Check if Hugo is already on $PATH
|
// 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() {
|
if checkVersion() {
|
||||||
return hugo
|
return hugoPath
|
||||||
}
|
}
|
||||||
|
|
||||||
found = true
|
found = true
|
||||||
@ -100,6 +101,7 @@ func GetPath() string {
|
|||||||
|
|
||||||
// Copy the file
|
// Copy the file
|
||||||
fmt.Print("Moving Hugo executable... ")
|
fmt.Print("Moving Hugo executable... ")
|
||||||
|
|
||||||
err = files.CopyFile(exetorename, hugo)
|
err = files.CopyFile(exetorename, hugo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user