about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-01-16T18·03+0100
committerEelco Dolstra <edolstra@gmail.com>2018-01-16T18·24+0100
commit75b9670df61b3e82e6d60a0572316fdacc9cbd91 (patch)
tree9548c656cbfba4234d2cb8e2e7f8ce4376c35cb2 /src
parentd4dcffd64349bb52ad5f1b184bee5cc7c2be73b4 (diff)
Make show-trace a config setting
Diffstat (limited to 'src')
-rw-r--r--src/libmain/shared.cc3
-rw-r--r--src/libstore/globals.hh3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 85d3c077ba5e..90a4867163df 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -193,9 +193,6 @@ LegacyArgs::LegacyArgs(const std::string & programName,
     mkFlag(0, "readonly-mode", "do not write to the Nix store",
         &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'",
         &gcWarning, false);
 
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index 81bb24a4eb38..1e50e2d13e93 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -211,7 +211,8 @@ public:
     bool lockCPU;
 
     /* 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",
         "Whether builtin functions that allow executing native code should be enabled."};