Skip to content

Commit

Permalink
expand symlinks and relative paths in main.go, fixes #21
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-clemente committed Nov 24, 2014
1 parent cde3f6a commit ac7047b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

## 0.1.2 (unreleased)

- Fixed latex rendering incorrectly sometimes (#22)
- Added `-p` option to specify port
- Fixed latex rendering incorrectly sometimes (#22)
- Fixed a bug with relative paths on OS X (#21)

## 0.1.1 (2014-10-25)

Expand Down
9 changes: 9 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"log"
"net/http"
"path/filepath"
"strconv"

assetfs "github.com/elazarl/go-bindata-assetfs"
Expand All @@ -27,6 +28,14 @@ func main() {
}

path := flag.Arg(0)
path, err := filepath.EvalSymlinks(path)
if err != nil {
log.Fatal(err)
}
path, err = filepath.Abs(path)
if err != nil {
log.Fatal(err)
}

repo, err := git.NewGitRepo(path)
if err != nil {
Expand Down

0 comments on commit ac7047b

Please sign in to comment.