all repos — searchix @ c4377589f5f6e97b430d4fabab2aa1bb72b0996d

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: don't force os.Root paths to be absolute

Alan Pearce
commit

c4377589f5f6e97b430d4fabab2aa1bb72b0996d

parent

1d518f42e04712c84dfc168cc7a286aabb56e2ed

1 file changed, 0 insertions(+), 9 deletions(-)

changed files
M internal/file/root.gointernal/file/root.go
@@ -30,15 +30,6 @@ return OpenRoot(name)
} func OpenRoot(name string) (*Root, error) { - if !filepath.IsAbs(name) { - wd, err := os.Getwd() - if err != nil { - return nil, fault.Wrap(err, fmsg.With("failed to get current working directory")) - } - - name = filepath.Join(wd, name) - } - r, err := os.OpenRoot(name) if err != nil { return nil, fault.Wrap(err, fmsg.Withf("failed to open data root directory %s", name))