diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index e71dbb04e7..1c4a18e217 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -16,6 +16,7 @@ - Tooltip and link icons are now positioned on shape border [#1466](https://github.com/terrastruct/d2/pull/1466) - Tooltip and link icons are always rendered over shapes [#1467](https://github.com/terrastruct/d2/pull/1467) - Boards with no objects are considered folders [#1504](https://github.com/terrastruct/d2/pull/1504) +- `DEBUG` environment variable ignored if set incorrectly [#1505](https://github.com/terrastruct/d2/pull/1505) #### Bugfixes ⛑️ diff --git a/d2cli/main.go b/d2cli/main.go index 0f0e8167bd..635a5e440e 100644 --- a/d2cli/main.go +++ b/d2cli/main.go @@ -67,7 +67,8 @@ func Run(ctx context.Context, ms *xmain.State) (err error) { } debugFlag, err := ms.Opts.Bool("DEBUG", "debug", "d", false, "print debug logs.") if err != nil { - return err + ms.Log.Warn.Printf("Invalid DEBUG flag value ignored") + debugFlag = go2.Pointer(false) } imgCacheFlag, err := ms.Opts.Bool("IMG_CACHE", "img-cache", "", true, "in watch mode, images used in icons are cached for subsequent compilations. This should be disabled if images might change.") if err != nil {