ignore invalid debug flag

This commit is contained in:
Alexander Wang 2023-07-29 10:07:20 -07:00
parent 0f7dc63bee
commit 477014d069
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE
2 changed files with 3 additions and 1 deletions

View file

@ -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 ⛑️

View file

@ -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 {