mirror of
https://github.com/NixOS/nix.git
synced 2024-11-21 22:32:26 +00:00
89e21ab4bd
Commit 83c067c0fa
changed `builtins.pathExists`
to resolve symlinks before checking for existence. Consequently, if the path
refers to a symlink itself, existence of the target of the symlink (instead of
the symlink itself) was checked. Restore the previous behavior by skipping
symlink resolution in the last component.
35 lines
2.0 KiB
Nix
35 lines
2.0 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 (builtins.toPath { __toString = x: builtins.toString ./lib.nix; })
|
|
&& builtins.pathExists (builtins.toPath { outPath = builtins.toString ./lib.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 + "/.")
|