include input path name in failure msg

This commit is contained in:
Alexander Wang 2023-09-25 15:20:17 -07:00
parent 3888937d71
commit 1d1bf24773
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE

View file

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