Skip to content

Commit

Permalink
PhantomJS: Fixes rendering on Debian Buster (#18162)
Browse files Browse the repository at this point in the history
Closes #17588
  • Loading branch information
xlson authored and torkelo committed Jul 20, 2019
1 parent 6e5898a commit 2014549
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkg/services/rendering/phantomjs.go
Expand Up @@ -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)
Expand Down

0 comments on commit 2014549

Please sign in to comment.