You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#1924 (0.6.6) changed relative file paths to be relative to the file instead of working directory of CLI execution.
While I support this change, there is one issue introduced, where relative paths in classes do not work if they're imported.
This example I hope explains the use case. Assume you have a directory structure as such:
direction: right
...@../models
myobj {
class: myclass
}
Before, I could make this work by executing the following, with the working directory being my-diagrams: d2 diagrams/subset/test.d2 output.svg
However, now I get the following error if I do that:
err: failed to bundle ./diagrams/icons/test.svg: open /Users/myuser/workspace/my-diagrams/diagrams/subset/diagrams/icons/test.svg: no such file or directory
err: failed to compile diagrams/subset/test.d2: failed to bundle local images: [./diagrams/icons/test.svg]
Am I missing a way where this could still work, or is this something that might require a fix?
The text was updated successfully, but these errors were encountered:
#1924 (0.6.6) changed relative file paths to be relative to the file instead of working directory of CLI execution.
While I support this change, there is one issue introduced, where relative paths in classes do not work if they're imported.
This example I hope explains the use case. Assume you have a directory structure as such:
With
models.d2
:And
test.d2
:Before, I could make this work by executing the following, with the working directory being
my-diagrams
:d2 diagrams/subset/test.d2 output.svg
However, now I get the following error if I do that:
Am I missing a way where this could still work, or is this something that might require a fix?
The text was updated successfully, but these errors were encountered: