From 14c2bb6ff2f18082cd7106ddaead42a9dac41061 Mon Sep 17 00:00:00 2001 From: Anant Pathak Date: Thu, 22 Feb 2018 22:49:09 +0530 Subject: [PATCH] use appRoot for current working directory --- leaks.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/leaks.go b/leaks.go index a8677488..a4e43862 100644 --- a/leaks.go +++ b/leaks.go @@ -27,7 +27,7 @@ func start(opts *Options) { signal.Notify(c, os.Interrupt, syscall.SIGTERM) //get current working directory - dir,err := os.Getwd() + appRoot, err := os.Getwd() if err != nil { fmt.Println(err) return @@ -35,7 +35,7 @@ func start(opts *Options) { repoName := getLocalRepoName(opts.RepoURL) fmt.Printf("Cloning \x1b[37;1m%s\x1b[0m...\n", opts.RepoURL) - _, err = git.PlainClone(dir + "/" + repoName, false, &git.CloneOptions{ + _, err = git.PlainClone(appRoot + "/" + repoName, false, &git.CloneOptions{ URL: opts.RepoURL, RecurseSubmodules: git.DefaultSubmoduleRecursionDepth, })