cb7bc7c60f
nixos-rebuild would forward all verbose flags to nix, but not actually increase its own verbosity. Which would make it hard to see what’s going on without resorting to tools like strace or adding `set -x` to the script. We add a simple exec wrapper around the most “interesting” commands, that is nix tool invocations. If any verbosity flag is given, it will set the verbosity flag of the nixos-rebuild script all commands wrapped into `runCmd` will start logging their invocation. This is done via a `logVerbose` function, which can also be used to print logging messages when in verbose mode, to aid debugging why nixos-rebuild does what it does. A few messages are added, but potentially we could log a lot more details. Now, testing all of the changed code paths turns out to be rather hard, so I am unsure how to verify that for all changed commands behaviour stays indeed the same. |
||
---|---|---|
.. | ||
default.nix | ||
nixos-rebuild.sh |