mirror of
1
0
Fork 0

Include built-in plugins in PyPI distribution

This commit is contained in:
Anish Athalye 2018-06-11 21:14:10 -04:00
parent f7a8bf10ba
commit 9d967ad7e8
6 changed files with 21 additions and 1 deletions

View File

@ -52,7 +52,7 @@ def main():
log.set_level(Level.DEBUG)
plugin_directories = list(options.plugin_dirs)
if not options.disable_built_in_plugins:
plugin_directories.append(os.path.join(os.path.dirname(__file__), '..', 'plugins'))
from .plugins import Clean, Link, Shell
plugin_paths = []
for directory in plugin_directories:
for plugin_path in glob.glob(os.path.join(directory, '*.py')):

View File

@ -0,0 +1,3 @@
from .clean import Clean
from .link import Link
from .shell import Shell

View File

@ -0,0 +1,17 @@
test_description='can disable built-in plugins'
. '../test-lib.bash'
test_expect_success 'setup' '
echo "apple" > ${DOTFILES}/f
'
test_expect_failure 'run' '
run_dotbot --disable-built-in-plugins <<EOF
- link:
~/.f: f
EOF
'
test_expect_failure 'test' '
test -f ~/.f
'