mirror of
https://github.com/cooperspencer/gickup
synced 2024-11-08 12:09:18 +01:00
fix relative path for issues (#189)
This commit is contained in:
parent
ccb0c5850d
commit
a78d73f5de
@ -193,6 +193,11 @@ func Locally(repo types.Repo, l types.Local, dry bool) bool {
|
||||
Msg(err.Error())
|
||||
}
|
||||
}
|
||||
issuesDir, err := filepath.Abs(fmt.Sprintf("%s.issues", repo.Name))
|
||||
if err != nil {
|
||||
sub.Error().
|
||||
Msg(err.Error())
|
||||
} else {
|
||||
sub.Info().Str("repo", repo.Name).Msg("backing up issues")
|
||||
if !dry {
|
||||
for k, v := range repo.Issues {
|
||||
@ -201,7 +206,7 @@ func Locally(repo types.Repo, l types.Local, dry bool) bool {
|
||||
sub.Error().
|
||||
Msg(err.Error())
|
||||
} else {
|
||||
err = os.WriteFile(filepath.Join(l.Path, fmt.Sprintf("%s.issues", repo.Name), fmt.Sprintf("%s.json", k)), jsonData, 0644)
|
||||
err = os.WriteFile(filepath.Join(issuesDir, fmt.Sprintf("%s.json", k)), jsonData, 0644)
|
||||
if err != nil {
|
||||
sub.Error().
|
||||
Msg(err.Error())
|
||||
@ -210,6 +215,7 @@ func Locally(repo types.Repo, l types.Local, dry bool) bool {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if l.Zip {
|
||||
tozip := []string{repo.Name}
|
||||
|
Loading…
Reference in New Issue
Block a user