From ccb0c5850dbea8054728967fd348536f1b89982f Mon Sep 17 00:00:00 2001 From: Andreas Wachter Date: Sun, 3 Dec 2023 14:56:01 +0100 Subject: [PATCH] fix path for clone (#187) --- local/local.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/local/local.go b/local/local.go index f5f3cbf..2d13643 100644 --- a/local/local.go +++ b/local/local.go @@ -35,6 +35,7 @@ var ( // Locally TODO. func Locally(repo types.Repo, l types.Local, dry bool) bool { sub = logger.CreateSubLogger("stage", "locally", "path", l.Path) + originPath, _ := os.Getwd() if l.LFS { g, err := gitcmd.New() if err != nil { @@ -277,6 +278,11 @@ func Locally(repo types.Repo, l types.Local, dry bool) bool { x = 5 } + if err := os.Chdir(originPath); err != nil { + sub.Error(). + Msg(err.Error()) + return false + } return true }