Make show-trace a config setting

This commit is contained in:
Eelco Dolstra 2018-01-16 19:03:31 +01:00
parent d4dcffd643
commit 75b9670df6
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 2 additions and 4 deletions

View file

@ -193,9 +193,6 @@ LegacyArgs::LegacyArgs(const std::string & programName,
mkFlag(0, "readonly-mode", "do not write to the Nix store", mkFlag(0, "readonly-mode", "do not write to the Nix store",
&settings.readOnlyMode); &settings.readOnlyMode);
mkFlag(0, "show-trace", "show Nix expression stack trace in evaluation errors",
&settings.showTrace);
mkFlag(0, "no-gc-warning", "disable warning about not using '--add-root'", mkFlag(0, "no-gc-warning", "disable warning about not using '--add-root'",
&gcWarning, false); &gcWarning, false);

View file

@ -211,7 +211,8 @@ public:
bool lockCPU; bool lockCPU;
/* Whether to show a stack trace if Nix evaluation fails. */ /* Whether to show a stack trace if Nix evaluation fails. */
bool showTrace = false; Setting<bool> showTrace{this, false, "show-trace",
"Whether to show a stack trace on evaluation errors."};
Setting<bool> enableNativeCode{this, false, "allow-unsafe-native-code-during-evaluation", Setting<bool> enableNativeCode{this, false, "allow-unsafe-native-code-during-evaluation",
"Whether builtin functions that allow executing native code should be enabled."}; "Whether builtin functions that allow executing native code should be enabled."};