mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
Merge pull request #11058 from hercules-ci/more-nix-shell
Make `#!nix-shell` arguments and options relative to script
This commit is contained in:
commit
1e1a8e8ad1
9 changed files with 133 additions and 3 deletions
|
@ -214,7 +214,7 @@ Bindings * MixEvalArgs::getAutoArgs(EvalState & state)
|
|||
auto v = state.allocValue();
|
||||
std::visit(overloaded {
|
||||
[&](const AutoArgExpr & arg) {
|
||||
state.mkThunk_(*v, state.parseExprFromString(arg.expr, state.rootPath(".")));
|
||||
state.mkThunk_(*v, state.parseExprFromString(arg.expr, compatibilitySettings.nixShellShebangArgumentsRelativeToScript ? state.rootPath(absPath(getCommandBaseDir())) : state.rootPath(".")));
|
||||
},
|
||||
[&](const AutoArgString & arg) {
|
||||
v->mkString(arg.s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue