PhantomJS: Fixes rendering on Debian Buster (#18162)

Closes #17588
pull/17388/head^2
Leonard Gram 6 years ago committed by Torkel Ödegaard
parent 6e5898ac79
commit 2014549fa5
  1. 12
      pkg/services/rendering/phantomjs.go

@ -67,10 +67,18 @@ func (rs *RenderingService) renderViaPhantomJS(ctx context.Context, opts Opts) (
timezone := ""
cmd.Env = os.Environ()
if opts.Timezone != "" {
timezone = isoTimeOffsetToPosixTz(opts.Timezone)
baseEnviron := os.Environ()
cmd.Env = appendEnviron(baseEnviron, "TZ", timezone)
cmd.Env = appendEnviron(cmd.Env, "TZ", timezone)
}
// Added to disable usage of newer version of OPENSSL
// that seem to be incompatible with PhantomJS (used in Debian Buster)
if runtime.GOOS == "linux" {
disableNewOpenssl := "/etc/ssl"
cmd.Env = appendEnviron(cmd.Env, "OPENSSL_CONF", disableNewOpenssl)
}
rs.log.Debug("executing Phantomjs", "binPath", binPath, "cmdArgs", cmdArgs, "timezone", timezone)

Loading…
Cancel
Save