Reduces the amount of "noise" included in bin/doom's output.
Also fixes an issue where warnings during autoloads generation would
sneak into Doom's autoloads file, producing weird void-variable errors,
like
(void-variable . rainbow-delimiters:)
(void-variable . diredfl:)
(void-variable . company:)
Causes a regression where output was written into /tmp/doom.sh,
producing errors like:
/tmp//doom.sh: string 4: $'\E[32m✓': command not found
I'll revert this until I have a better solution.
Still a long way to go, but this introduces a few niceties for
debugging CLI failures:
+ The (extended) output of the last bin/doom command is now logged to
~/.emacs.d/.local/doom.log
+ If an error occurs, short backtraces are displayed whether or not you
have debug mode on. The full backtrace is written to
~/.emacs.d/.local/doom.error.log.
+ bin/doom now aborts with a warning if:
- The script itself or its parent directory is a symlink. It's fine if
~/.emacs.d is symlinked though.
- Running bin/doom as root when your DOOMDIR isn't in /root/.
- If you're sporting Emacs 26.1 (now handled in the elisp side rather
than the /bin/sh shebang preamble).
+ If a 'doom sync' was aborted prematurely, you'll be warned that Doom
was left in an inconsistent state and that you must run `doom sync`
again.
May address #3746
`format` isn't an appropriate for this library, considering it (and
future additions to it) will be mainly concerned with printing or
capturing output.