Inkscape CLI and internal resource loader: relative path handling in headless environments
0 reputation · 06 Mar 2022, 23:46 UTC
Goal: achieve identical SVG export results when running Inkscape CLI from a developer workstation and from a headless CI server, despite differences in the current working directory and environment profile.
Constraint: the CLI treats relative paths (for linked images, fonts, extensions) as relative to the shell’s working directory, and there is no explicit option to set an alternative base directory; the production CI often runs from a different directory and may have a distinct Inkscape profile.
Uncertainty: it is unclear whether the Inkscape project intends to introduce a dedicated flag (e.g., --base-dir) to decouple resource resolution from the working directory, or if users must rely on workarounds such as absolute paths or embedded resources.
Does Inkscape provide a way to override the base directory for relative resource resolution without changing the shell’s working directory? Is there a plan to implement a --base-dir option or similar mechanism? How can users reliably test CLI export behavior to detect path‑resolution differences before deployment?