File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ static void getAllExprs(EvalState & state,
109109 const SourcePath & path, StringSet & seen, BindingsBuilder & attrs)
110110{
111111 StringSet namesSorted;
112- for (auto & [name, _] : path.readDirectory ()) namesSorted.insert (name);
112+ for (auto & [name, _] : path.resolveSymlinks (). readDirectory ()) namesSorted.insert (name);
113113
114114 for (auto & i : namesSorted) {
115115 /* Ignore the manifest.nix used by profiles. This is
Original file line number Diff line number Diff line change @@ -189,3 +189,9 @@ nix-env --set $outPath10
189189[ " $( nix-store -q --resolve $profiles /test) " = $outPath10 ]
190190nix-env --set $drvPath10
191191[ " $( nix-store -q --resolve $profiles /test) " = $outPath10 ]
192+
193+ # Test the case where $HOME contains a symlink.
194+ mkdir -p $TEST_ROOT /real-home/alice/.nix-defexpr/channels
195+ ln -sfn $TEST_ROOT /real-home $TEST_ROOT /home
196+ ln -sfn $( pwd) /user-envs.nix $TEST_ROOT /home/alice/.nix-defexpr/channels/foo
197+ HOME=$TEST_ROOT /home/alice nix-env -i foo-0.1
You can’t perform that action at this time.
0 commit comments