Problem/Motivation

Some D2 settings can only be set by passing a CLI option (eg. --elk-padding). It'd be nice to be able to add options programmatically.

Proposed resolution

We call the D2 CLI using using Symfony's Process component. This takes an array of command elements as an argument. We current pass in ["path/to/d2/binary", "-", "-"] which sets input to STDIN and output to STDOUT.

As a first pass, we could add a hook (or similar mechanism) that could allow arbitrary options to be added.

Comments

ergonlogic created an issue. See original summary.

ergonlogic’s picture

Status: Active » Fixed

Added hook_d2_command_options().

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.