diff --git a/tests/test_reckless.py b/tests/test_reckless.py index 3615b71a5..4a1e59a93 100644 --- a/tests/test_reckless.py +++ b/tests/test_reckless.py @@ -231,7 +231,6 @@ def test_poetry_install(node_factory): @unittest.skipIf(VALGRIND, "virtual environment triggers memleak detection") -@unittest.skip("Broken") def test_local_dir_install(node_factory): """Test search and install from local directory source.""" n = get_reckless_node(node_factory) diff --git a/tools/reckless b/tools/reckless index 7b692d391..13535aa3d 100755 --- a/tools/reckless +++ b/tools/reckless @@ -1175,10 +1175,13 @@ def _install_plugin(src: InstInfo) -> Union[InstInfo, None]: log.debug(f'{clone_path} already exists - deleting') shutil.rmtree(clone_path) if src.srctype == Source.DIRECTORY: + full_source_path = Path(src.source_loc) + if src.subdir: + full_source_path /= src.subdir log.debug(("copying local directory contents from" - f" {src.source_loc}")) + f" {full_source_path}")) create_dir(clone_path) - shutil.copytree(src.source_loc, plugin_path) + shutil.copytree(full_source_path, plugin_path) elif src.srctype in [Source.LOCAL_REPO, Source.GITHUB_REPO, Source.OTHER_URL, Source.GIT_LOCAL_CLONE]: # clone git repository to /tmp/reckless-...