aboutsummaryrefslogtreecommitdiff
path: root/internal/commands/add.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-10-23 13:05:05 +0000
committerFuwn <[email protected]>2024-10-23 13:05:05 +0000
commit2036ad87691ad92fc45c352b317bd0c1fd587189 (patch)
tree0d0f65a11910081f7036859ee028fe9a6dc49cfd /internal/commands/add.go
parentdocs(readme): fix typo (diff)
downloadyae-2036ad87691ad92fc45c352b317bd0c1fd587189.tar.xz
yae-2036ad87691ad92fc45c352b317bd0c1fd587189.zip
feat(yae): dry-run flag
Diffstat (limited to 'internal/commands/add.go')
-rw-r--r--internal/commands/add.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/commands/add.go b/internal/commands/add.go
index e32d07d..1b32533 100644
--- a/internal/commands/add.go
+++ b/internal/commands/add.go
@@ -107,6 +107,10 @@ func Add(sources *yae.Sources) func(c *cli.Context) error {
return err
}
+ if c.Bool("dry-run") {
+ return nil
+ }
+
return sources.Save(c.String("sources"))
}
}