pathExists: isDir when endswith /.#9022
Conversation
|
I might make the test case a list so we can see individual failures? |
bf48d95 to
6eefc12
Compare
|
@Ericson2314 would be nice to have a standard solution for this, but did it by hand this time, as I was able to reproduce the problem locally. Seems like either I messed up when I wrote this before NixCon or something happened in the meanwhile. Anyway, the problem is that Nix appears to canonicalize the path without checking that all components actually resolve to something that exists. |
This is perhaps a better way to implement this function anyway. Check each path component, and check that it's a directory unless it's the last component. |
|
Not sure what you mean, but can do the list vs && && && && later. |
6eefc12 to
f8a3893
Compare
|
Backport failed for Please cherry-pick the changes locally. git fetch origin 2.18-maintenance
git worktree add -d .worktree/backport-9022-to-2.18-maintenance origin/2.18-maintenance
cd .worktree/backport-9022-to-2.18-maintenance
git checkout -b backport-9022-to-2.18-maintenance
ancref=$(git merge-base 9c84054f97f96ae6c6ea9ff24d3376c485b0f188 f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c)
git cherry-pick -x $ancref..f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c |
|
Backport failed for Please cherry-pick the changes locally. git fetch origin 2.16-maintenance
git worktree add -d .worktree/backport-9022-to-2.16-maintenance origin/2.16-maintenance
cd .worktree/backport-9022-to-2.16-maintenance
git checkout -b backport-9022-to-2.16-maintenance
ancref=$(git merge-base 9c84054f97f96ae6c6ea9ff24d3376c485b0f188 f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c)
git cherry-pick -x $ancref..f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c |
|
Backport failed for Please cherry-pick the changes locally. git fetch origin 2.17-maintenance
git worktree add -d .worktree/backport-9022-to-2.17-maintenance origin/2.17-maintenance
cd .worktree/backport-9022-to-2.17-maintenance
git checkout -b backport-9022-to-2.17-maintenance
ancref=$(git merge-base 9c84054f97f96ae6c6ea9ff24d3376c485b0f188 f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c)
git cherry-pick -x $ancref..f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c |
|
Backport failed for Please cherry-pick the changes locally. git fetch origin 2.18-maintenance
git worktree add -d .worktree/backport-9022-to-2.18-maintenance origin/2.18-maintenance
cd .worktree/backport-9022-to-2.18-maintenance
git checkout -b backport-9022-to-2.18-maintenance
ancref=$(git merge-base 9c84054f97f96ae6c6ea9ff24d3376c485b0f188 f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c)
git cherry-pick -x $ancref..f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c |
|
Backport failed for Please cherry-pick the changes locally. git fetch origin 2.16-maintenance
git worktree add -d .worktree/backport-9022-to-2.16-maintenance origin/2.16-maintenance
cd .worktree/backport-9022-to-2.16-maintenance
git checkout -b backport-9022-to-2.16-maintenance
ancref=$(git merge-base 9c84054f97f96ae6c6ea9ff24d3376c485b0f188 f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c)
git cherry-pick -x $ancref..f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c |
|
Backport failed for Please cherry-pick the changes locally. git fetch origin 2.17-maintenance
git worktree add -d .worktree/backport-9022-to-2.17-maintenance origin/2.17-maintenance
cd .worktree/backport-9022-to-2.17-maintenance
git checkout -b backport-9022-to-2.17-maintenance
ancref=$(git merge-base 9c84054f97f96ae6c6ea9ff24d3376c485b0f188 f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c)
git cherry-pick -x $ancref..f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c |
|
Backport failed for Please cherry-pick the changes locally. git fetch origin 2.18-maintenance
git worktree add -d .worktree/backport-9022-to-2.18-maintenance origin/2.18-maintenance
cd .worktree/backport-9022-to-2.18-maintenance
git checkout -b backport-9022-to-2.18-maintenance
ancref=$(git merge-base 9c84054f97f96ae6c6ea9ff24d3376c485b0f188 f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c)
git cherry-pick -x $ancref..f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c |
Motivation
builtins.pathExists#8838The more complicated cases with
..and such were already handled correctly, so most of the extra test cases already worked.Context
/#8869Priorities
Add 👍 to pull requests you find important.