mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-05 05:20:34 +00:00
Support for switching to smira/commander with free placement of flags. #17
This commit is contained in:
+6
-6
@@ -23,16 +23,16 @@ func aptlyRepoEdit(cmd *commander.Command, args []string) error {
|
||||
return fmt.Errorf("unable to edit: %s", err)
|
||||
}
|
||||
|
||||
if cmd.Flag.Lookup("comment").Value.String() != "" {
|
||||
repo.Comment = cmd.Flag.Lookup("comment").Value.String()
|
||||
if context.flags.Lookup("comment").Value.String() != "" {
|
||||
repo.Comment = context.flags.Lookup("comment").Value.String()
|
||||
}
|
||||
|
||||
if cmd.Flag.Lookup("distribution").Value.String() != "" {
|
||||
repo.DefaultDistribution = cmd.Flag.Lookup("distribution").Value.String()
|
||||
if context.flags.Lookup("distribution").Value.String() != "" {
|
||||
repo.DefaultDistribution = context.flags.Lookup("distribution").Value.String()
|
||||
}
|
||||
|
||||
if cmd.Flag.Lookup("component").Value.String() != "" {
|
||||
repo.DefaultComponent = cmd.Flag.Lookup("component").Value.String()
|
||||
if context.flags.Lookup("component").Value.String() != "" {
|
||||
repo.DefaultComponent = context.flags.Lookup("component").Value.String()
|
||||
}
|
||||
|
||||
err = context.collectionFactory.LocalRepoCollection().Update(repo)
|
||||
|
||||
Reference in New Issue
Block a user