forked from lix-project/lix
* Absolutise the specified path in --import' and
--profile'.
This commit is contained in:
parent
4db7ef3fcc
commit
47f19b6293
|
@ -629,7 +629,7 @@ static void opSwitchProfile(Globals & globals,
|
||||||
throw UsageError(format("`--profile' takes at most one argument"));
|
throw UsageError(format("`--profile' takes at most one argument"));
|
||||||
|
|
||||||
Path linkPath =
|
Path linkPath =
|
||||||
opArgs.size() == 0 ? globals.linkPath : opArgs.front();
|
absPath(opArgs.size() == 0 ? globals.linkPath : opArgs.front());
|
||||||
Path linkPathFinal = getHomeDir() + "/.nix-userenv";
|
Path linkPathFinal = getHomeDir() + "/.nix-userenv";
|
||||||
|
|
||||||
switchLink(linkPathFinal, linkPath);
|
switchLink(linkPathFinal, linkPath);
|
||||||
|
@ -644,7 +644,7 @@ static void opDefaultExpr(Globals & globals,
|
||||||
if (opArgs.size() != 1)
|
if (opArgs.size() != 1)
|
||||||
throw UsageError(format("`--import' takes exactly one argument"));
|
throw UsageError(format("`--import' takes exactly one argument"));
|
||||||
|
|
||||||
Path defNixExpr = opArgs.front();
|
Path defNixExpr = absPath(opArgs.front());
|
||||||
Path defNixExprLink = getDefNixExprPath();
|
Path defNixExprLink = getDefNixExprPath();
|
||||||
|
|
||||||
switchLink(defNixExprLink, defNixExpr);
|
switchLink(defNixExprLink, defNixExpr);
|
||||||
|
|
Loading…
Reference in a new issue