By default, if output is a TTY, dotbot will colorize the output. This
patch adds the option to pass `--no-color` to dotbot to have it suppress
this colorization.
Prior to this patch, Dotbot was relying on running with the base
directory being the current working directory. In practice, it was
relying on the install shim to set up this context. It makes more sense
sense to actually execute `chdir()` within Dotbot itself, rather than
relying on the install shim to do so.
In our use case, we are *not* reading arbitrary input that could be
malicious. Still, because we know that what we're reading is made up of
only dictionaries and lists and not arbitrary Python objects, we might
as well use the more restrictive `safe_load` function rather than the
`load` function.
This commit adds an option to the extended configuration syntax for
linking files and directories. The relink option is a safe alternative
to forcibly linking that only removes broken symbolic links, so it
cannot result in data loss.
Check if entry to force-create (delete) is a symlink and if so, simply
unlink it. Don't try to run rmtree on the underlying directory, which
will fail anyway.
This commit introduces an extended configuration syntax for shell
commands. This syntax allows for specifying whether the stdin, stdout,
and stderr streams are enabled.
This commit fixes a bug where forced links did not work on certain types
of bad links. Until this fix, forced links only worked if the original
was a real file or directory. This commit fixes this, so that the forced
link option also works when the original is a broken or incorrect
symbolic link.
Add support for YAML format configuration files. In addition, this
commit adds instructions about YAML config files to the README, and it
also changes the README to encourage use of YAML instead of JSON.
This commit introduces an additional option for extended configuration
syntax for linking. It adds the "create" parameter which results in
automatically creating a parent directory if necessary before linking a
file.
This commit introduces an extended configuration syntax for linking
files and directories. Currently, this syntax allows for specifying
items to be forcibly linked, overwriting existing files or directories
if necessary.
The extended configuration syntax was proposed by Travers McInerney
<travers@mcinerney.me>.
When failing to symbolically linking files, display the names of the
files that could not be linked. This makes it easier to troubleshoot the
error without having to manually figure out which files failed to link.
Linker now reports an error when links are configured to point to
nonexistent targets. This fixes the old behavior where Linker silently
created invalid links.
According to PEP 394, `python` should only be used in the shebang line
for scripts that are source compatible with both Python 2 and Python 3.
In previous versions of Dotbot, on certain systems where `python`
referred to `python3`, running Dotbot would throw an exception due to a
SyntaxError. This can be fixed by making Dotbot source compatible with
both Python 2 and Python 3.