enhance error message if phantomjs executable is not found
if arm build, explain that phantomjs is not included by default in arm builds. If not explain that phantom js isn't installed correctly
This commit is contained in:
@@ -24,6 +24,11 @@ func (rs *RenderingService) renderViaPhantomJS(ctx context.Context, opts Opts) (
|
||||
|
||||
url := rs.getURL(opts.Path)
|
||||
binPath, _ := filepath.Abs(filepath.Join(rs.Cfg.PhantomDir, executable))
|
||||
if _, err := os.Stat(binPath); os.IsNotExist(err) {
|
||||
rs.log.Error("executable not found", "executable", binPath)
|
||||
return nil, ErrPhantomJSNotInstalled
|
||||
}
|
||||
|
||||
scriptPath, _ := filepath.Abs(filepath.Join(rs.Cfg.PhantomDir, "render.js"))
|
||||
pngPath := rs.getFilePathForNewImage()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user