1
1
mirror of https://github.com/cooperspencer/gickup synced 2024-09-18 23:01:35 +02: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

View File

@ -35,6 +35,7 @@ var (
// Locally TODO. // Locally TODO.
func Locally(repo types.Repo, l types.Local, dry bool) bool { func Locally(repo types.Repo, l types.Local, dry bool) bool {
sub = logger.CreateSubLogger("stage", "locally", "path", l.Path) sub = logger.CreateSubLogger("stage", "locally", "path", l.Path)
originPath, _ := os.Getwd()
if l.LFS { if l.LFS {
g, err := gitcmd.New() g, err := gitcmd.New()
if err != nil { if err != nil {
@ -277,6 +278,11 @@ func Locally(repo types.Repo, l types.Local, dry bool) bool {
x = 5 x = 5
} }
if err := os.Chdir(originPath); err != nil {
sub.Error().
Msg(err.Error())
return false
}
return true return true
} }