Skip to content

Commit

Permalink
fix: the method to get self path
Browse files Browse the repository at this point in the history
  • Loading branch information
tingzhen.lin committed Dec 2, 2019
1 parent 25e99db commit c2e2957
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ func CopyFile(dstName, srcName string) (written int64, err error) {
}

func Install() (string, error) {
srcName := os.Args[0]
srcName, _ := exec.LookPath(os.Args[0])
log.Printf("self path: %s", srcName)
dstDir, err := execPath()
if err != nil {
return "", err
Expand Down

0 comments on commit c2e2957

Please sign in to comment.