summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.go b/main.go
index 496d09b..89d90e6 100644
--- a/main.go
+++ b/main.go
@@ -148,9 +148,9 @@ func pik() spool.ExitCode {
var st *model.State
var stateErrors []error
- var c *cache.Cache
+ var c cache.Cache
if !*flags.All {
- st, stateErrors = model.NewState(fs, locs, indexers, runners)
+ st, stateErrors = model.NewState(fs, locs, pikdex.Indexer.Data, indexers, runners)
go func() {
if len(stateErrors) > 0 {
return
@@ -162,12 +162,12 @@ func pik() spool.ExitCode {
}()
} else {
- c, err = cache.LoadFile(fs, paths.ContextsFile.String()[1:])
+ c, err = cache.Get()
if err != nil {
_, _ = spool.Warn("%v\n", err)
return spool.CacheReadFailure
}
- st, stateErrors = cache.LoadState(fs, c, indexers, runners)
+ st, stateErrors = cache.LoadState(fs, pikdex.Indexer.Data, c, indexers, runners)
}
if stateErrors != nil {
_, _ = spool.Warn("%v\n", stateErrors)
@@ -212,7 +212,7 @@ func pik() spool.ExitCode {
// TODO: Move auto-all logic into Search?
if !*flags.All && result.Target == nil && len(result.Args) > 0 && SourcesWithoutResults == nil && !ForceConfirm {
ForceConfirm = true
- SourcesWithoutResults = c
+ SourcesWithoutResults = &c
return pik()
}