mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
ignore-try flag
This commit is contained in:
parent
1892355766
commit
9151dbff88
5 changed files with 27 additions and 1 deletions
|
@ -91,6 +91,12 @@ EvalCommand::EvalCommand()
|
|||
.description = "start an interactive environment if evaluation fails",
|
||||
.handler = {&startReplOnEvalErrors, true},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "ignore-try",
|
||||
.description = "ignore exceptions in try clauses during debug",
|
||||
.handler = {&ignoreExceptionsDuringTry, true},
|
||||
});
|
||||
}
|
||||
|
||||
EvalCommand::~EvalCommand()
|
||||
|
@ -120,7 +126,10 @@ ref<EvalState> EvalCommand::getEvalState()
|
|||
;
|
||||
|
||||
if (startReplOnEvalErrors) {
|
||||
evalState->debugRepl = &runRepl;
|
||||
evalState->debugRepl = &runRepl;
|
||||
};
|
||||
if (ignoreExceptionsDuringTry) {
|
||||
evalState->ignoreTry = ignoreExceptionsDuringTry;
|
||||
};
|
||||
}
|
||||
return ref<EvalState>(evalState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue