pulumi/pulumi · error
internal error: creating renderer: %w
Error message
internal error: creating renderer: %w
What it means
For interactive terminals the CLI renders the markdown report with the glamour library via `style.Glamour`. If the renderer cannot be constructed (e.g. terminal capability/style setup failure), the command fails with `internal error: creating renderer: %w`. Like error 273, this indicates an environment/CLI problem rather than bad user input.
Source
Thrown at pkg/cmd/esc/cli/env_get.go:131
if defOnly {
fmt.Fprint(get.env.esc.stdout, data.Definition)
return nil
}
var markdown bytes.Buffer
if err := envGetTemplate.Execute(&markdown, data); err != nil {
return fmt.Errorf("internal error: rendering: %w", err)
}
if !cmdutil.InteractiveTerminal() {
fmt.Fprint(get.env.esc.stdout, markdown.String())
return nil
}
renderer, err := style.Glamour(get.env.esc.stdout, glamour.WithWordWrap(0))
if err != nil {
return fmt.Errorf("internal error: creating renderer: %w", err)
}
rendered, err := renderer.Render(markdown.String())
if err != nil {
rendered = markdown.String()
}
fmt.Fprint(get.env.esc.stdout, rendered)
return nil
},
}
cmd.Flags().BoolVar(
&defOnly, "definition", false,
"Set to print just the definition.")
cmd.Flags().StringVar(
&value, "value", "",
"Set to print just the value in the given format. May be 'dotenv', 'json', 'detailed', 'shell' or 'string'")
cmd.Flags().BoolVar(
&showSecrets, "show-secrets", false,View on GitHub (pinned to 793f7b2e16)
Solutions
- Set a standard `TERM` value (e.g. `export TERM=xterm-256color`) or unset a bogus one.
- Redirect output to a file/pipe so the non-interactive markdown path is used.
- Upgrade the CLI; if it persists, file a bug since rendering failures fall back only for Render, not renderer creation.
Example fix
// before TERM=vt100x pulumi env get my-org/my-env // after TERM=xterm-256color pulumi env get my-org/my-env
Defensive patterns
Strategy: fallback
Validate before calling
// shell if [ -t 1 ] && [ -z "$TERM" -o "$TERM" = "dumb" ]; then echo "unset/odd TERM; forcing non-interactive-safe output" >&2 fi
Try / catch
// shell pulumi env get "$ENV_REF" || pulumi env get "$ENV_REF" --value json
Prevention
- Set a widely available TERM such as xterm-256color in containers and CI.
- Pipe or redirect output in automation so the glamour path is skipped.
- Keep the CLI current so terminal-detection fixes are picked up.
When it happens
Trigger: `style.Glamour(get.env.esc.stdout, glamour.WithWordWrap(0))` returns an error during an interactive `pulumi env get` run — typically misconfigured TERM, missing terminfo, or a broken glamour/auto-detection of terminal width.
Common situations: Running inside odd terminal emulators, CI wrappers that fake a TTY, minimal containers lacking terminfo entries, or with exotic `TERM` values.
Related errors
- internal error: rendering: %w
- internal error: rendering: %w
- internal error: no expr for path %v
- internal error: creating renderer: %w
- the clone command does not accept versions
AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31).
Data as JSON: /api/errors/411d1433489cb0ef.
Report an issue: GitHub.