1
1
mirror of https://github.com/cooperspencer/gickup synced 2024-11-08 12:09:18 +01:00

fix path for clone (#187)

This commit is contained in:
Andreas Wachter 2023-12-03 14:56:01 +01:00 committed by GitHub
parent 52a834b42b
commit ccb0c5850d
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -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
}