about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-01-20T20·36+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-01-20T20·36+0000
commit47f19b6293357a8bdc3a2290813765170f241b58 (patch)
tree1657094a95dbbcd6153fc57285cd4d3d046d810b /src
parent4db7ef3fcc7c392dc03fc02a22886a8c9bcbcacb (diff)
* Absolutise the specified path in `--import' and `--profile'.
Diffstat (limited to 'src')
-rw-r--r--src/nix-env/main.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index 5c27a89fcd75..eaa11fe259b1 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -629,7 +629,7 @@ static void opSwitchProfile(Globals & globals,
         throw UsageError(format("`--profile' takes at most one argument"));
 
     Path linkPath = 
-        opArgs.size() == 0 ? globals.linkPath : opArgs.front();
+        absPath(opArgs.size() == 0 ? globals.linkPath : opArgs.front());
     Path linkPathFinal = getHomeDir() + "/.nix-userenv";
 
     switchLink(linkPathFinal, linkPath);
@@ -644,7 +644,7 @@ static void opDefaultExpr(Globals & globals,
     if (opArgs.size() != 1)
         throw UsageError(format("`--import' takes exactly one argument"));
 
-    Path defNixExpr = opArgs.front();
+    Path defNixExpr = absPath(opArgs.front());
     Path defNixExprLink = getDefNixExprPath();
     
     switchLink(defNixExprLink, defNixExpr);