{"record":{"id":"3ced7545f842e330","repo":"JanDeDobbeleer/oh-my-posh","slug":"pulumi-stack-name-is-empty-use-fetch-stack-prop","errorCode":null,"errorMessage":"pulumi stack name is empty, use `fetch_stack` property to enable stack fetching","messagePattern":"pulumi stack name is empty, use `fetch_stack` property to enable stack fetching","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/segments/pulumi.go","lineNumber":160,"sourceCode":"\n\treturn nil\n}\n\nfunc (p *Pulumi) sha1HexString(s string) string {\n\th := sha1.New()\n\n\t_, err := h.Write([]byte(s))\n\tif err != nil {\n\t\tlog.Error(err)\n\t\treturn \"\"\n\t}\n\n\treturn hex.EncodeToString(h.Sum(nil))\n}\n\nfunc (p *Pulumi) getPulumiAbout() {\n\tif p.Stack == \"\" {\n\t\tlog.Error(fmt.Errorf(\"pulumi stack name is empty, use `fetch_stack` property to enable stack fetching\"))\n\t\treturn\n\t}\n\n\taboutOutput, err := p.env.RunCommand(\"pulumi\", \"about\", \"--json\")\n\n\tif err != nil {\n\t\tlog.Error(fmt.Errorf(\"unable to get pulumi about output\"))\n\t\treturn\n\t}\n\n\tvar about struct {\n\t\tBackend *Backend `json:\"backend\"`\n\t}\n\n\terr = json.Unmarshal([]byte(aboutOutput), &about)\n\tif err != nil {\n\t\tlog.Error(fmt.Errorf(\"pulumi about output decode error\"))\n\t\treturn","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/JanDeDobbeleer/oh-my-posh/blob/0976794618c5ed95de0985dded50de1b4dc914cb/src/segments/pulumi.go#L142-L178","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Add fetch_stack: true to the pulumi segment block in your theme config so the stack name is resolved before fetch_about runs","Run `pulumi up` (or `pulumi stack select`) once in the project so ~/.pulumi/workspaces contains the workspace cache file","Check that Pulumi.yaml exists with a valid `name:` field so the project name can be computed for the cache lookup"],"exampleFix":"// before (theme .toml)\n[[blocks.segments]]\ntype = \"pulumi\"\n[blocks.segments.properties]\nfetch_about = true\n// after\n[[blocks.segments]]\ntype = \"pulumi\"\n[blocks.segments.properties]\nfetch_stack = true\nfetch_about = true","handlingStrategy":"validation","validationCode":"# in the theme config, always pair fetch_about with fetch_stack\n[blocks.segments.properties]\nfetch_stack = true\nfetch_about = true","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always enable fetch_stack when enabling fetch_about","Run `pulumi up` at least once per project so the workspace cache exists","Verify ~/.pulumi/workspaces contains the expected workspace cache file"],"tags":["go","pulumi","config","missing-option"],"backgroundTag":"missing-required-option","analyzedSha":"0976794618c5ed95de0985dded50de1b4dc914cb","analyzedAt":"2026-08-31T23:41:19.708Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}