diff options
| author | ewy <ewy0@protonmail.com> | 2026-06-02 15:07:59 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-06-02 15:07:59 +0200 |
| commit | f77fc4ef5f2df96c6bba3cd6c7d88a77d61a5a80 (patch) | |
| tree | bdead2d2b245407aaa20e71c433d7c8f757d7049 /main.go | |
| parent | 6d607f114f63184a43237a3ff80aee622401ee23 (diff) | |
.wants adds potential out-of-tree sources to your state (for monorepos, for example)
.includes adds targets from another source to this one, adding inheritance
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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() } |
