Include built-in plugins in PyPI distribution
This commit is contained in:
parent
f7a8bf10ba
commit
9d967ad7e8
6 changed files with 21 additions and 1 deletions
|
@ -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')):
|
||||
|
|
3
dotbot/plugins/__init__.py
Normal file
3
dotbot/plugins/__init__.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from .clean import Clean
|
||||
from .link import Link
|
||||
from .shell import Shell
|
17
test/tests/plugin-disable-builtin.bash
Normal file
17
test/tests/plugin-disable-builtin.bash
Normal 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
|
||||
'
|
Loading…
Reference in a new issue