aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastian Blunt <nix@sebastianblunt.com>2022-04-10 21:09:04 -0700
committerSebastian Blunt <nix@sebastianblunt.com>2022-04-10 21:10:37 -0700
commit63d9a818194f940fcd2da8fb68bef303c984f300 (patch)
treefea9b22102427b77ed6fd45e31193bf7b2c5836b /src
parent646af7325d93f98802b989f8a8e008a25f7a4788 (diff)
Log builder args and environment variables
Previously it only logged the builder's path, this changes it to log the arguments at the same log level, and the environment variables at the vomit level. This helped me debug https://github.com/svanderburg/node2nix/issues/75
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build/local-derivation-goal.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
index 40ef706a6..4c91fa4fb 100644
--- a/src/libstore/build/local-derivation-goal.cc
+++ b/src/libstore/build/local-derivation-goal.cc
@@ -704,6 +704,9 @@ void LocalDerivationGoal::startBuilder()
/* Run the builder. */
printMsg(lvlChatty, "executing builder '%1%'", drv->builder);
+ printMsg(lvlChatty, "using builder args '%1%'", concatStringsSep(" ", drv->args));
+ for (auto & i : drv->env)
+ printMsg(lvlVomit, "setting builder env variable '%1%'='%2%'", i.first, i.second);
/* Create the log file. */
Path logFile = openLogFile();