JanDeDobbeleer/oh-my-posh · warning

pulumi stack name is empty, use `fetch_stack` property to en

Error message

pulumi stack name is empty, use `fetch_stack` property to enable stack fetching

What it means

The pulumi segment can fetch backend information via `pulumi about --json`, but it needs to know which stack to query. This error is thrown when the fetch_about option is enabled but the Stack field is still empty — meaning stack fetching (fetch_stack) was not enabled or did not resolve a stack name, so there is nothing to request about.

Source

Thrown at src/segments/pulumi.go:160

	return nil
}

func (p *Pulumi) sha1HexString(s string) string {
	h := sha1.New()

	_, err := h.Write([]byte(s))
	if err != nil {
		log.Error(err)
		return ""
	}

	return hex.EncodeToString(h.Sum(nil))
}

func (p *Pulumi) getPulumiAbout() {
	if p.Stack == "" {
		log.Error(fmt.Errorf("pulumi stack name is empty, use `fetch_stack` property to enable stack fetching"))
		return
	}

	aboutOutput, err := p.env.RunCommand("pulumi", "about", "--json")

	if err != nil {
		log.Error(fmt.Errorf("unable to get pulumi about output"))
		return
	}

	var about struct {
		Backend *Backend `json:"backend"`
	}

	err = json.Unmarshal([]byte(aboutOutput), &about)
	if err != nil {
		log.Error(fmt.Errorf("pulumi about output decode error"))
		return

View on GitHub (pinned to 0976794618)

Solutions

  1. Add fetch_stack: true to the pulumi segment block in your theme config so the stack name is resolved before fetch_about runs
  2. Run `pulumi up` (or `pulumi stack select`) once in the project so ~/.pulumi/workspaces contains the workspace cache file
  3. Check that Pulumi.yaml exists with a valid `name:` field so the project name can be computed for the cache lookup

Example fix

// before (theme .toml)
[[blocks.segments]]
type = "pulumi"
[blocks.segments.properties]
fetch_about = true
// after
[[blocks.segments]]
type = "pulumi"
[blocks.segments.properties]
fetch_stack = true
fetch_about = true
Defensive patterns

Strategy: validation

Validate before calling

# in the theme config, always pair fetch_about with fetch_stack
[blocks.segments.properties]
fetch_stack = true
fetch_about = true

Prevention

When it happens

Trigger: Config sets fetch_about: true (directly or via template properties) but fetch_stack is false/absent, or fetch_stack is true but the stack could not be resolved (no ~/.pulumi/workspaces cache entry for the project+workspace SHA1, or project name is empty).

Common situations: Fresh machine where pulumi has never run `pulumi up` in the project (no workspace cache file), project without a spec file so Name is empty, or a theme that enables fetch_about without fetch_stack.

Understand the failure class

Background: "Must pass :limit option" / "Missing required option" — required option errors explained — this error's family across 41 libraries.

Related errors


AI-assisted analysis of JanDeDobbeleer/oh-my-posh@0976794618 (2026-08-31). Data as JSON: /api/errors/3ced7545f842e330. Report an issue: GitHub.