update filepath Joins
parent
e9b13f961b
commit
e7369b17b5
|
@ -53,10 +53,10 @@ func Install() string {
|
||||||
os.Exit(-1)
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
|
|
||||||
caddy := filepath.Clean(usr.HomeDir + "/.caddy/")
|
caddy := filepath.Join(usr.HomeDir, ".caddy")
|
||||||
bin := filepath.Clean(caddy + "/bin")
|
bin := filepath.Join(caddy, "bin")
|
||||||
temp := filepath.Clean(caddy + "/temp")
|
temp := filepath.Join(caddy, "temp")
|
||||||
hugo := filepath.Clean(bin + "/hugo")
|
hugo := filepath.Join(bin, "hugo")
|
||||||
|
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "darwin":
|
case "darwin":
|
||||||
|
@ -84,7 +84,7 @@ func Install() string {
|
||||||
err = os.Mkdir(bin, 0774)
|
err = os.Mkdir(bin, 0774)
|
||||||
err = os.Mkdir(temp, 0774)
|
err = os.Mkdir(temp, 0774)
|
||||||
|
|
||||||
tempfile := temp + "/" + filename
|
tempfile := filepath.Join(temp, filename)
|
||||||
|
|
||||||
fmt.Print("Downloading Hugo from GitHub releases... ")
|
fmt.Print("Downloading Hugo from GitHub releases... ")
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ func Install() string {
|
||||||
|
|
||||||
fmt.Println("done.")
|
fmt.Println("done.")
|
||||||
|
|
||||||
tempfiles = append(tempfiles, bin+"/README.md", bin+"/LICENSE.md")
|
tempfiles = append(tempfiles, filepath.Join(bin, "README.md"), filepath.Join(bin, "LICENSE.md"))
|
||||||
clean()
|
clean()
|
||||||
|
|
||||||
ftorename := bin + "/"
|
ftorename := bin + "/"
|
||||||
|
|
Loading…
Reference in New Issue