Skip to content

asciidoctor-diagram in combination with plantuml creates a ? directory in source directory #471

Description

@sdavids
$ mkdir -p /tmp/test && cd "$_"
$ mkdir src build
$ cat << 'EOF' >src/test.adoc
[plantuml]
----
@startuml

label Test

@enduml
----
EOF
$ tree -a --noreport /tmp/test
/tmp/test
├── build
└── src
    └── test.adoc
$ docker run \
  --rm \
  -u "$(id -u):$(id -g)" \
  -v '/tmp/test/src:/documents' \
  -v '/tmp/test/build:/mnt/build' \
  asciidoctor/docker-asciidoctor:1.76.0 \
  sh -c 'asciidoctor-pdf -D /mnt/build -r asciidoctor-diagram test.adoc'
Fontconfig error: No writable cache directories
...
$ tree -a --noreport /tmp/test
/tmp/test
├── build
│   ├── .asciidoctor
│   │   └── diagram
│   │       └── diag-plantuml-md5-e44a8461ee81fc745bd01cef0a04d9dc.png.cache
│   ├── diag-plantuml-md5-e44a8461ee81fc745bd01cef0a04d9dc.png
│   └── test.pdf
└── src
    ├── ?
    │   └── .java
    │       └── fonts
    │           └── 17.0.12
    │               └── fcinfo-1-ddfe350edc90-Alpine Linux-3.20.3-en-US.properties
    └── test.adoc

Notice the creation of the src/? directory.

I am not sure if it is a side-effect of #470.

Regardless, this directory should be created somewhere else so one can mount the src directory as readonly:

$ docker run \
  --rm \
  -u "$(id -u):$(id -g)" \
  -v '/tmp/test/src:/documents:ro' \
  -v '/tmp/test/build:/mnt/build' \
  asciidoctor/docker-asciidoctor:1.76.0 \
  sh -c 'asciidoctor-pdf -D /mnt/build -r asciidoctor-diagram test.adoc'

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