Browse Source

Don't load index if we encountered an error

pull/8/head
Daniel Martí 11 years ago
parent
commit
0aec8d6248
  1. 16
      cmd/fdroidcl/search.go

16
cmd/fdroidcl/search.go

@ -29,21 +29,19 @@ func init() {
}
func runSearch(args []string) {
index := mustLoadIndex()
apps := filterAppsSearch(index.Apps, args)
if *installed && *updates {
fmt.Println("-i and -u at the same time don't make sense")
fmt.Println("-i is redundant if -u is specified")
cmdSearch.Flag.Usage()
}
index := mustLoadIndex()
apps := filterAppsSearch(index.Apps, args)
if *installed {
device := oneDevice()
installed := mustInstalled(device)
apps = filterAppsInstalled(apps, installed)
instPkgs := mustInstalled(oneDevice())
apps = filterAppsInstalled(apps, instPkgs)
}
if *updates {
device := oneDevice()
installed := mustInstalled(device)
apps = filterAppsUpdates(apps, installed)
instPkgs := mustInstalled(oneDevice())
apps = filterAppsUpdates(apps, instPkgs)
}
if *quiet {
for _, app := range apps {

Loading…
Cancel
Save