eldritch horrors
b14f88e0d4
Restore `builtins.pathExists` behavior on broken symlinks
(cherry picked from commit d53c8901ef7f2033855dd99063522e3d56a19dab)
===
note that this variant differs markedly from the source commit because
we haven't endured quite as much lazy trees.
Change-Id: I0facf282f21fe0db4134be5c65a8368c1b3a06fc
33 lines
1.8 KiB
Nix
33 lines
1.8 KiB
Nix
builtins.pathExists (./lib.nix)
|
|
&& builtins.pathExists (builtins.toPath ./lib.nix)
|
|
&& builtins.pathExists (builtins.toString ./lib.nix)
|
|
&& !builtins.pathExists (builtins.toString ./lib.nix + "/")
|
|
&& !builtins.pathExists (builtins.toString ./lib.nix + "/.")
|
|
# FIXME
|
|
# && !builtins.pathExists (builtins.toString ./lib.nix + "/..")
|
|
# && !builtins.pathExists (builtins.toString ./lib.nix + "/a/..")
|
|
# && !builtins.pathExists (builtins.toString ./lib.nix + "/../lib.nix")
|
|
&& !builtins.pathExists (builtins.toString ./lib.nix + "/./")
|
|
&& !builtins.pathExists (builtins.toString ./lib.nix + "/./.")
|
|
&& builtins.pathExists (builtins.toString ./.. + "/lang/lib.nix")
|
|
&& !builtins.pathExists (builtins.toString ./.. + "lang/lib.nix")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/lib.nix")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/./lib.nix")
|
|
&& builtins.pathExists (builtins.toString ./.)
|
|
&& builtins.pathExists (builtins.toString ./. + "/")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/.")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/./")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang//./")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/..")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/../")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/..//")
|
|
&& builtins.pathExists (builtins.toPath (builtins.toString ./lib.nix))
|
|
&& !builtins.pathExists (builtins.toPath (builtins.toString ./bla.nix))
|
|
&& builtins.pathExists ./lib.nix
|
|
&& !builtins.pathExists ./bla.nix
|
|
&& builtins.pathExists ./symlink-resolution/foo/overlays/overlay.nix
|
|
&& builtins.pathExists ./symlink-resolution/broken
|
|
&& builtins.pathExists (builtins.toString ./symlink-resolution/foo/overlays + "/.")
|