Merge pull request #1617 from alixander/name-failed
cli: include input path name in failure msg
This commit is contained in:
commit
f26e9bd3e5
2 changed files with 3 additions and 2 deletions
|
|
@ -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 ⛑️
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue