diff --git a/common/nix_candidate_source.go b/common/nix_candidate_source.go index 0e8e051..b9da87a 100644 --- a/common/nix_candidate_source.go +++ b/common/nix_candidate_source.go @@ -1,13 +1,23 @@ package common +import "runtime" + type NixCandidateSource struct { - fs Filesystem + fs Filesystem + sources map[string]*PathSetIn } func NewNixCandidateSource(fs Filesystem) CandidateSource { - return &NixCandidateSource{fs} + return &NixCandidateSource{ + fs, + map[string]*PathSetIn{}, + } } func (s *NixCandidateSource) WhereSet(somePath string) *PathSetIn { - return nil + if runtime.GOOS == "windows" { + return nil + } + normalizedPath := s.fs.GetAbsolutePath(somePath) + return s.sources[normalizedPath] }