forked from lix-project/lix
Merge remote-tracking branch 'shlevy/baseNameOf-no-copy'
baseNameOf: Don't copy paths to the store first
This commit is contained in:
commit
73bf32ce94
|
@ -710,7 +710,7 @@ static void prim_pathExists(EvalState & state, const Pos & pos, Value * * args,
|
||||||
static void prim_baseNameOf(EvalState & state, const Pos & pos, Value * * args, Value & v)
|
static void prim_baseNameOf(EvalState & state, const Pos & pos, Value * * args, Value & v)
|
||||||
{
|
{
|
||||||
PathSet context;
|
PathSet context;
|
||||||
mkString(v, baseNameOf(state.coerceToString(pos, *args[0], context)), context);
|
mkString(v, baseNameOf(state.coerceToString(pos, *args[0], context, false, false)), context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
let s = "foo ${builtins.substring 33 100 (baseNameOf ./eval-okay-context.nix)} bar";
|
let s = "foo ${builtins.substring 33 100 (baseNameOf "${./eval-okay-context.nix}")} bar";
|
||||||
in
|
in
|
||||||
if s != "foo eval-okay-context.nix bar"
|
if s != "foo eval-okay-context.nix bar"
|
||||||
then abort "context not discarded"
|
then abort "context not discarded"
|
||||||
|
|
Loading…
Reference in a new issue