mirror of
1
0
Fork 0
Commit Graph

22 Commits

Author SHA1 Message Date
Anish Athalye ed60c62432 Improve output of '--version' 2023-07-09 15:26:46 -04:00
Kurt McKee ea98e5eafc Add isort as a tox environment, and run it 2022-05-13 10:44:29 -05:00
Kurt McKee b5499c7dc5 Separate module importing from plugin identification
This change allows the test framework to reliably specify
which plugins to load and use within the same process.

Previously, plugins were loaded by importing files and then
accessing the Plugin class' list of subclasses.
Now, it's possible to run dotbot multiple times without
plugins accruing across runs with different configurations
and CLI arguments.

In addition, this fixes some circular imports that were
previously avoided because plugins were imported in a function.
2022-05-13 10:44:29 -05:00
Anish Athalye 769767c129 Migrate code style to Black 2022-01-30 18:53:05 -05:00
Subho Banerjee 4d2e1537f4
adding a exit on failure flag 2021-09-12 19:34:44 -05:00
Anish Athalye eb7f3fb7b1 Include git hash in version when available 2021-02-27 14:34:52 -05:00
E. Keys c35382c06d Add cli option force shell show stderr/stdout
Passing `--verbose` flag two times will now force shell commands to show
stderr/stdout output regardless of settings in config file.

Resolves #104
2021-02-25 08:00:07 -05:00
E. Keys b18ba4d392 Make parsed CLI options available to plugins 2021-02-25 07:57:12 -05:00
Bob Whitelock 2432a2ba87 Add `--force-color` option
This forces Dotbot to produce colored output, regardless of whether it
is outputting to a TTY.

This is useful to support use cases such as piping colored Dotbot output
into another program for formatting (e.g. I want to indent the output as
part of a larger installation script); this was not previously easy to
do as this would cause the output to lose its colored formatting.

This option cannot be provided at the same time as the existing
`--no-color` option, as there's no logical interpretation of what effect
providing both of these should have.

As part of this change I've refactored some existing code determining
whether output should be colored to where options are parsed, as this
made this change simpler and I think it makes sense for all this logic
to be performed in the same place.
2020-08-23 00:02:26 +01:00
Anish Athalye c5e709d433 Make error for empty config a little friendlier
In the setup guide in the README, we have people start out with an empty
file (created using `touch`). Before this patch, Dotbot gave the
following error:

    Configuration file must be a list of tasks

Instead, with this patch, Dotbot says:

    Configuration file is empty, no work to do

This change was prompted by
https://github.com/anishathalye/dotbot/pull/226.
2020-06-25 16:07:23 -04:00
Anish Athalye 7ffaa65482 Add --only and --except command-line arguments
Internal to Dotbot, we use the name "skip" instead of "except", because
the latter is a keyword, and using a name like "except_" didn't seem as
nice.
2020-03-26 11:23:07 -04:00
Anish Athalye 320d5d0123 Add tests for canonicalize-path 2020-01-03 16:45:35 -05:00
Jesse Leite 5a0f6676d4 Add 'create' directive to create directories 2019-10-12 11:55:09 -04:00
Philip Hallstrom a22d980cdf Add option --no-color to suppress colorization of output
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.
2018-10-06 16:08:26 -07:00
Anish Athalye 9d967ad7e8 Include built-in plugins in PyPI distribution 2018-06-11 21:14:10 -04:00
Anish Athalye 30caaf2780 Add PyPI package
This patch also makes the '-d' argument optional, with the base
directory defaulting to the directory of the configuration file.
2018-05-30 10:23:53 -04:00
Anish Athalye c3f271481a Fix handling of base directory
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.
2018-05-24 12:57:49 -04:00
Casey Rodarmor eeb4c284fb Add plugin loader 2016-02-06 15:14:35 -05:00
Anish Athalye 3c60899895 Improve error message for malformed files
This patch makes Dotbot warn the user and gracefully exit when the
configuration file is not a list.
2015-04-26 19:46:14 -04:00
Anish Athalye fd08ddacd3 Fix style
Fix formatting of keyword arguments according to PEP 8.
2015-04-24 18:26:20 -04:00
Anish Athalye 92ed009245 Add keyboard interrupt handler 2014-07-19 00:29:49 -07:00
Anish Athalye 60a560e976 Initial commit 2014-03-20 18:57:56 -04:00