Skip to content

Bug when using the symlink driver #22

@n-burger

Description

@n-burger

Thanks for the great work. I think this extension is very helpful! Unfortunately, the symlink driver is not usable at the moment.

The function Collections:init (collections.py, line 101), creates a directory for every collection. Subsequently, the symlink driver fails to create a symlink, because a directory under the same name exists already:

Executing collections ...
  external_folder: (SymlinkDriver) Creating symlink...
Traceback (most recent call last):
  File "***/sphinxcontrib/collections/drivers/symlink.py", line 54, in run
    os.symlink(source, target)
FileExistsError: [Errno 17] File exists: ***/doc/external_folder' -> '***/doc/_collections/external_folder'

Configuration used:

collections = {
    "external_folder": {
        "driver": "symlink",
        "source": str(PROJECT_BASE / "external_folder"),
        "target": "external_folder",
    },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions