Skip to content

Commit

Permalink
Merge pull request #1617 from alixander/name-failed
Browse files Browse the repository at this point in the history
cli: include input path name in failure msg
  • Loading branch information
alixander authored Sep 25, 2023
2 parents 24b5778 + 2be527c commit f26e9bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ci/release/changelogs/next.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Latex now includes Mathjax's ASM extension for more powerful Latex functionality [#1544](https://github.com/terrastruct/d2/pull/1544)
- `font-color` works on Markdown [#1546](https://github.com/terrastruct/d2/pull/1546)
- `font-color` works on arrowheads [#1582](https://github.com/terrastruct/d2/pull/1582)
- CLI failure message includes input path [#1617](https://github.com/terrastruct/d2/pull/1617)

#### Bugfixes ⛑️

Expand Down
4 changes: 2 additions & 2 deletions d2cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ func Run(ctx context.Context, ms *xmain.State) (err error) {
_, written, err := compile(ctx, ms, plugins, layoutFlag, renderOpts, fontFamily, *animateIntervalFlag, inputPath, outputPath, "", *bundleFlag, *forceAppendixFlag, pw.Page)
if err != nil {
if written {
return fmt.Errorf("failed to fully compile (partial render written): %w", err)
return fmt.Errorf("failed to fully compile (partial render written) %s: %w", ms.HumanPath(inputPath), err)
}
return fmt.Errorf("failed to compile: %w", err)
return fmt.Errorf("failed to compile %s: %w", ms.HumanPath(inputPath), err)
}
return nil
}
Expand Down

0 comments on commit f26e9bd

Please sign in to comment.