summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* plugins/clean: fix typoHEADmasterAnton Khirnov2021-04-24
|
* Include pyaml directly, not as a submodule.Anton Khirnov2020-11-20
| | | | | | | Its repository is quite big and contains infrastructure we do not need. We should not need to update it, so just include the source directly. Also, simplify bin/dotbot.
* plugins/link: use info log level for link creationAnton Khirnov2020-11-15
| | | | Forgotten in 7eabd28
* Add a dry run mode.Anton Khirnov2020-11-15
|
* plugins/link: drop the glob optionAnton Khirnov2020-11-15
| | | | It is too complex.
* plugins/link: drop create optionsAnton Khirnov2020-11-15
| | | | It is an unnecessary complication. Just list the directories explicitly.
* plugin: reduce code duplicationAnton Khirnov2020-11-15
| | | | | Factor out supported directive checking, drop redundant checking in handle().
* Tweak log levels.Anton Khirnov2020-11-15
| | | | | Use info for changes performed (e.g. changes to the filesystem, code executed). Use verbose for "nothing to do" messages.
* messenger: rename lowinfo to verboseAnton Khirnov2020-11-15
| | | | This is more standard terminology.
* Merge branch 'bobwhitelock/add-force-color-option' into masterAnish Athalye2020-08-23
|\
| * Add `--force-color` optionBob Whitelock2020-08-23
|/ | | | | | | | | | | | | | | | | | | 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.
* Release 1.17.1Anish Athalye2020-07-24
|
* Merge branch 'TimPansino/feature/module_run_support'Anish Athalye2020-07-24
|\
| * Added support to run with python -mtpansin2020-07-23
|/
* Make error for empty config a little friendlierAnish Athalye2020-06-25
| | | | | | | | | | | | | | | 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.
* Standardize documentation for extended configAnish Athalye2020-06-19
| | | | | | | | | This patch adds parameter/explanation tables for the two other commands that support extended configuration syntaxes, so now we have identically-formatted tables for link, shell, and clean. This change was prompted by https://github.com/anishathalye/dotbot/issues/223.
* Remove confusing exampleAnish Athalye2020-06-19
| | | | | | | | Without an explanation of what's going on here, this example is unnecessarily confusing. It's a neat example, but probably not worth explaining this in Dotbot's README. See https://github.com/anishathalye/dotbot/issues/224.
* Work around subprocess.call() issue on WindowsAnish Athalye2020-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On POSIX-like systems, calling `subprocess.call()` with both `shell=True` and `executable='...'` has the following behavior: > If `shell=True`, on POSIX the _executable_ argument specifies a > replacement shell for the default `/bin/sh`. (via https://docs.python.org/3/library/subprocess.html?highlight=subprocess#popen-constructor) This seems to have a similar behavior on Windows, but this is problematic when a POSIX shell is substituted for cmd.exe. This is because when `shell=True`, the shell is invoked with a '/c' argument, which is the correct argument for cmd.exe but not for Bash, which expects a '-c' argument instead. See here: https://github.com/python/cpython/blob/1def7754b7a41fe57efafaf5eff24cfa15353444/Lib/subprocess.py#L1407 This is problematic when combined with Dotbot's behavior, where the `executable` argument is set based on `$SHELL`. For example, when running in Git Bash, the `$SHELL` environment variable is set to Bash, so any commands run by Dotbot will fail (because it'll invoke Bash with a '/c' argument). This behavior of setting the `executable` argument based on `$SHELL` was introduced in 7593d8c13479b382357be065c7bf51562a130660. This is the desired behavior. See discussion in https://github.com/anishathalye/dotbot/issues/97 and https://github.com/anishathalye/dotbot/pull/100. Unfortunately, this doesn't work quite right on Windows. This patch works around the issue by avoiding setting the `executable` argument when the platform is Windows, which is tested using `platform.system() == 'Windows'`. This means that shell commands executed by Dotbot on this platform will always be run using cmd.exe. Invocations of single programs or simple commands will probably work just fine in cmd.exe. If Bash-like behavior is desired, the user will have to write their command as `bash -c '...'`. This shouldn't have any implications for backwards-compatibility, because setting the `executable` argument on Windows didn't do the right thing anyways. Previous workarounds that users had should continue to work with the new code. When using Python from CYGWIN, `platform.system()` returns something like 'CYGWIN_NT-...', so it won't be detected with the check, but this is the correct behavior, because CYGWIN Python's `subprocess.call()` has the POSIX-like behavior. This patch also refactors the code to factor out the `subprocess.call()`, which was being called in both `link.py` and `shell.py`, so the workaround can be applied in a single place. See the following issues/pull requests for a discussion of this bug: - https://github.com/anishathalye/dotbot/issues/170 - https://github.com/anishathalye/dotbot/pull/177 - https://github.com/anishathalye/dotbot/issues/219 An issue has also been raised in Python's issue tracker: - https://bugs.python.org/issue40467 Thanks to @shivapoudel for originally reporting the issue, @SuJiKiNen for debugging it and submitting a pull request, and @mohkale for suggesting factoring out the code so that other plugins could use it.
* Add --only and --except command-line argumentsAnish Athalye2020-03-26
| | | | | | 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.
* Upgrade PyYAML to 5.3Anish Athalye2020-01-06
|
* Release 1.17.0Anish Athalye2020-01-03
|
* Merge branch 'ypid/add/link_real_path_option'Anish Athalye2020-01-03
|\
| * Add tests for canonicalize-pathAnish Athalye2020-01-03
| |
| * Add 'canonicalize-path' option to linkRobin Schneider2020-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dotbot had a hardcoded behaviour that the BASEDIR was always passed to os.path.realpath which "returns the canonical path of the specified filename, eliminating any symbolic links encountered in the path". This might not always be desirable so this commit makes it configurable. The use case where `canonicalize-path` comes in handy is the following: You want to provide dotfiles in the Filesystem Hierarchy Standard under `/usr/local/share/ypid_dotfiles/`. Now you want to provide `.config/dotfiles` as a default in `/etc/skel`. When you now pre-configure `/etc/skel` by running dotbot in it set has HOME, dotfiles will refer to `/usr/local/share/ypid_dotfiles/` and not `/etc/skel/.config/dotfiles` which does not look nice. This is related to but not the same as the `relative` parameter used with link commands.
* | Update datesAnish Athalye2020-01-03
| |
* | Unify Vagrant and Travis-CI testsAnish Athalye2020-01-03
| | | | | | | | | | | | | | | | | | | | This patch makes the tests (including the test driver) run entirely inside Vagrant, which avoids calling the very slow `vagrant` driver many times for running the tests. On my machine, `./test` runs in 22 seconds, down from hundreds of seconds prior to this patch. This also has the nice side effect of matching how the Travis CI tests were run, so there's no need for a separate `test_travis` anymore.
* | Fix incorrect use of `is` over `==`Anish Athalye2020-01-03
| | | | | | | | | | | | Comparing strings and integers with `is` is a bug: comparisons should be done with `==`. It might not have caused observable problems in the past because small integers and strings can be interned.
* | Add Python 3.8 to Travis testsAnish Athalye2020-01-03
|/
* Add option to clean recursivelyAnish Athalye2019-12-31
|
* Fix clean not respecting defaultsAnish Athalye2019-12-31
| | | | | | | | | | Previously, clean read the defaults once, and then it updated the setting for each entry it read. This resulted in the defaults being clobbered and then not being respected for subsequent entries. This patch fixes the issue by re-reading the defaults before processing each item. The other plugins (link, shell) do not have this problem.
* Merge branch 'apuignav/ignore-missing'Anish Athalye2019-12-31
|\
| * Add ignore-missing option to linkAlbert Puig2019-12-31
|/
* Migrate to travis-ci.comAnish Athalye2019-12-28
|
* Bump PyYAML version to 5.1.2Anish Athalye2019-11-20
|
* Add example of conditional linkAnish Athalye2019-11-14
|
* Make list more compactAnish Athalye2019-11-12
|
* Merge branch 'jesseleite/readme-organization'Anish Athalye2019-11-12
|\
| * Add table of contents and organize headings a bitJesse Leite2019-11-12
| |
* | Merge branch 'paulohefagundes/remove_which'Anish Athalye2019-11-09
|\ \ | |/ |/|
| * Replace `which` with `command -v`Paulo Fagundes2019-11-09
|/ | | | | | | | | Some distributions such as Arch Linux no longer install `which` by default through the base package (see https://www.archlinux.org/news/base-group-replaced-by-mandatory-base-package-manual-intervention-required/). The maintainers have explained why `command -v` is superior: https://www.reddit.com/r/archlinux/comments/de1er6/arch_linux_news_base_group_replaced_by_mandatory/f2v8uhu/.
* Release 1.16.0Anish Athalye2019-10-12
|
* Merge branch 'jesseleite/create-directive'Anish Athalye2019-10-12
|\
| * Add 'create' directive to create directoriesJesse Leite2019-10-12
| |
* | Switch to more recent version of DebianAnish Athalye2019-10-12
|/
* Merge branch 'darsh12/master'Anish Athalye2019-09-17
|\
| * Add instructions to ignore dirty commitsDarshan Patel2019-09-17
|/
* Remove explicit specification of environmentAnish Athalye2019-08-18
|
* Update Travis CI configAnish Athalye2019-08-18
| | | | | - Use Xenial for all tests - Drop support for Python 3.2 and Python 3.3
* Make launcher prefer python over python3Anish Athalye2019-06-26
| | | | | | | This patch makes the launcher script prefer `python`, when present, over `python3`. This way, the launcher uses the user's preferred `python` (which is often set up as a symbolic link to a particular python2.x or python3.x), when available.
* Merge branch 'ronalabraham/patch-1'Anish Athalye2019-06-05
|\