mirror of
1
0
Fork 0
Commit Graph

13 Commits

Author SHA1 Message Date
Anish Athalye ec8498ffb8 Merge branch 'ypid/add/link_real_path_option' 2020-01-03 16:46:19 -05:00
Robin Schneider 138fdbc8d7
Add 'canonicalize-path' option to link
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.
2020-01-03 22:35:13 +01:00
Anish Athalye 1e1885c45a Fix incorrect use of `is` over `==`
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.
2020-01-03 15:31:24 -05:00
Anish Athalye e38e021ab3 Add option to clean recursively 2019-12-31 19:14:23 -05:00
Anish Athalye 81f0d74955 Fix clean not respecting defaults
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.
2019-12-31 14:47:32 -05:00
Albert Puig eabd84bce1 Add ignore-missing option to link 2019-12-31 14:25:53 -05:00
Jesse Leite 5a0f6676d4 Add 'create' directive to create directories 2019-10-12 11:55:09 -04:00
ronalabraham 017c70b5b0
Change `target` to `source` for consistency with docs 2019-06-04 15:20:00 -04:00
Anish Athalye 5e2d40939e Merge branch 'thtliife/suppress-shell-cmd' 2018-11-21 19:50:46 -05:00
Bao Trinh 7add866215
Support defining default conditional option for links 2018-11-17 15:00:18 -06:00
Ben Klein a9cf9fffe4 Implement conditional linking 2018-10-16 20:22:40 -04:00
Derek P Sifford cf55ca5188 Fix clean path expansion to expand env vars 2018-08-06 20:41:42 -04:00
Anish Athalye 9d967ad7e8 Include built-in plugins in PyPI distribution 2018-06-11 21:14:10 -04:00