From 3f3ae16337c1a22a71beb7f34769e7ad26a91501 Mon Sep 17 00:00:00 2001 From: Andreas Wachter Date: Thu, 30 Nov 2023 20:44:08 +0100 Subject: [PATCH] fix path for clone --- local/local.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/local/local.go b/local/local.go index dc9468c..033cb47 100644 --- a/local/local.go +++ b/local/local.go @@ -33,6 +33,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 { @@ -242,6 +243,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 }