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