diff --git a/docs/userguide.rst b/docs/userguide.rst index 17c9b54..f5cc731 100644 --- a/docs/userguide.rst +++ b/docs/userguide.rst @@ -338,6 +338,7 @@ Configuration reference If the ``url`` as well as the ``path`` is defined, the path is used to overwrite the checkout directory, that defaults to ``kas_work_dir`` + ``repo.name``. + In case of a relative path name ``kas_work_dir`` is prepended. * ``layers``: dict [optional] Contains the layers from this repository that should be added to the diff --git a/kas/repos.py b/kas/repos.py index 0d96ab4..519ed6c 100644 --- a/kas/repos.py +++ b/kas/repos.py @@ -96,7 +96,12 @@ class Repo: url = path disable_operations = True else: - path = path or os.path.join(config.kas_work_dir, name) + if path is None: + path = os.path.join(config.kas_work_dir, name) + else: + if not os.path.isabs(path): + # Relative pathes are assumed to start from work_dir + path = os.path.join(config.kas_work_dir, path) if typ == 'git': return GitRepo(url, path, refspec, layers, disable_operations)