Merge pull request #2486 from alixander/config-casing

plugin: ignore name casing
This commit is contained in:
Alexander Wang 2025-04-06 23:59:47 -07:00 committed by GitHub
commit 75633193a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -17,6 +17,7 @@
- Support `validate` command. [#2415](https://github.com/terrastruct/d2/pull/2415)
- Watch mode ignores backup files (e.g. files created by certain editors like Helix). [#2131](https://github.com/terrastruct/d2/issues/2131)
- Support for `--omit-version` flag. [#2377](https://github.com/terrastruct/d2/issues/2377)
- Casing is ignored for plugin names [#2486](https://github.com/terrastruct/d2/pull/2486)
- Compiler:
- `link`s can be set to root path, e.g. `/xyz`. [#2357](https://github.com/terrastruct/d2/issues/2357)
- When importing a file, attempt resolving substitutions at the imported file scope first [#2482](https://github.com/terrastruct/d2/pull/2482)

View file

@ -9,6 +9,7 @@ import (
"context"
"encoding/json"
"os/exec"
"strings"
"oss.terrastruct.com/util-go/xexec"
"oss.terrastruct.com/util-go/xmain"
@ -170,7 +171,7 @@ func FindPlugin(ctx context.Context, ps []Plugin, name string) (Plugin, error) {
if err != nil {
return nil, err
}
if info.Name == name {
if strings.EqualFold(info.Name, name) {
return p, nil
}
}