⛩️ Powerful yet Minimal Nix Dependency Manager
flake flakes home-manager nixos go nix dependency dependencies
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(yae): dry-run flag

Fuwn 2036ad87 7a652ccf

+20 -1
+3
README.md
··· 200 200 201 201 GLOBAL OPTIONS: 202 202 --sources value Sources path (default: "./yae.json") 203 + --debug Enable debug output (default: false) 204 + --silent Silence log output (default: false) 205 + --dry-run Prevents writing to disk (default: false) 203 206 --help, -h show help 204 207 205 208 COPYRIGHT:
+4
internal/commands/add.go
··· 107 107 return err 108 108 } 109 109 110 + if c.Bool("dry-run") { 111 + return nil 112 + } 113 + 110 114 return sources.Save(c.String("sources")) 111 115 } 112 116 }
+4
internal/commands/drop.go
··· 19 19 20 20 sources.Drop(c.Args().Get(0)) 21 21 22 + if c.Bool("dry-run") { 23 + return nil 24 + } 25 + 22 26 return sources.Save(c.String("sources")) 23 27 } 24 28 }
+4
internal/commands/init.go
··· 14 14 return fmt.Errorf("sources file already exists") 15 15 } 16 16 17 + if c.Bool("dry-run") { 18 + return nil 19 + } 20 + 17 21 return sources.Save(c.String("sources")) 18 22 } 19 23 }
+1 -1
internal/commands/update.go
··· 53 53 } 54 54 } 55 55 56 - if len(updates) > 0 { 56 + if len(updates) > 0 && !c.Bool("dry-run") { 57 57 if err := sources.Save(c.String("sources")); err != nil { 58 58 return err 59 59 }
+4
yae.go
··· 65 65 return nil 66 66 }, 67 67 }, 68 + &cli.BoolFlag{ 69 + Name: "dry-run", 70 + Usage: "Prevents writing to disk", 71 + }, 68 72 }, 69 73 Copyright: fmt.Sprintf("Copyright (c) 2024-%s Fuwn", fmt.Sprint(time.Now().Year())), 70 74 ExitErrHandler: func(c *cli.Context, err error) {