aboutsummaryrefslogtreecommitdiff
path: root/yae.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-10-11 14:15:27 -0700
committerFuwn <[email protected]>2024-10-11 14:15:27 -0700
commit1b2192c9e3981faacf6bb9b3027cfe7f1885e68a (patch)
treef1a5a6cfd5ef8291824822a1e7ebf7110c73cfd6 /yae.go
parent6da4d60909b11e6b08a355c80883c40384c51bc0 (diff)
downloadyae-1b2192c9e3981faacf6bb9b3027cfe7f1885e68a.tar.xz
yae-1b2192c9e3981faacf6bb9b3027cfe7f1885e68a.zip
feat(yae): only write when at least one source updated
Diffstat (limited to 'yae.go')
-rw-r--r--yae.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/yae.go b/yae.go
index d997724..74e2fcd 100644
--- a/yae.go
+++ b/yae.go
@@ -208,8 +208,10 @@ func main() {
}
}
- if err := sources.Save(c.String("sources")); err != nil {
- return err
+ if len(updates) > 0 {
+ if err := sources.Save(c.String("sources")); err != nil {
+ return err
+ }
}
if c.Bool("show-updated-only") {