about summary refs log tree commit diff
path: root/src/nix-env
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-01-15T14·50+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-01-15T14·50+0000
commit71ceb1c16102f82e15375afb44e0ac59e39eaa23 (patch)
treea4c2e0e78a901052aeea565e5f44b43277da2bdf /src/nix-env
parente4b0666f8eee3fc48f37c0cd3fd194c27652173c (diff)
* Handle multiple indirect symlinks when loading a Nix expression.
Diffstat (limited to 'src/nix-env')
-rw-r--r--src/nix-env/nix-env.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 04641697f1bd..113f49ccb3e4 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -1113,10 +1113,7 @@ static void opDefaultExpr(Globals & globals,
     if (opArgs.size() != 1)
         throw UsageError(format("exactly one argument expected"));
 
-    Path defNixExpr = absPath(opArgs.front());
-    Path defNixExprLink = getDefNixExprPath();
-    
-    switchLink(defNixExprLink, defNixExpr);
+    switchLink(getDefNixExprPath(), absPath(opArgs.front()));
 }