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
diff options
context:
space:
mode:
authorDan Hersam <dan@hersam.com>2015-01-28 04:09:10 +0300
committerbep <bjorn.erik.pedersen@gmail.com>2015-01-28 11:43:12 +0300
commit2d8e15a5651408fe40b7365334625c487625a1e0 (patch)
treeaef5f71ebf0359d707cc14db7841d41df2adef80
parent06b1a88358e69f4182fdd82da998810054f5a88f (diff)
Version uses binary name instead of hugo
On Windows the binary name is hugo.exe and running hugo version results in this error: GetFileAttributesEx D:\Dev\Go\gopath\bin\hugo: The system cannot find the file specified. This fixes that error and allows the binary name to be something other than hugo on any OS.
-rw-r--r--commands/version.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/version.go b/commands/version.go
index 41ada5694..799ff70df 100644
--- a/commands/version.go
+++ b/commands/version.go
@@ -58,7 +58,7 @@ func setBuildDate() {
fmt.Println(err)
return
}
- fi, err := os.Lstat(filepath.Join(dir, "hugo"))
+ fi, err := os.Lstat(filepath.Join(dir, filepath.Base(fname)))
if err != nil {
fmt.Println(err)
return