change chrome path priority close #1

This commit is contained in:
Adrian Zürcher
2025-12-24 12:15:50 +01:00
parent 537179af03
commit edb8d7e830
3 changed files with 32 additions and 14 deletions

View File

@@ -11,11 +11,14 @@ func Convert(chromePath, inputFile, outputFile string) error {
Input: inputFile,
Output: outputFile,
}
c := converter.NewConverter(chromePath)
c, err := converter.NewConverter(chromePath)
if err != nil {
return err
}
return c.Convert(input)
}
// NewConverterInstance start new chrome headless shell instance
func NewConverterInstance(chromePath string) *converter.Converter {
func NewConverterInstance(chromePath string) (*converter.Converter, error) {
return converter.NewConverter(chromePath)
}