JanDeDobbeleer/oh-my-posh · error

no assets found

Error message

no assets found

What it means

CascadiaCode looks up the latest GitHub release of microsoft/cascadia-code and expects exactly one zip asset. If fetchFontAssets returns an error, or the release contains zero or multiple assets, it fails with 'no assets found'. The function has no fallback, so any deviation from the expected single-asset release shape is fatal.

Source

Thrown at src/cli/font/fonts.go:99

	cache.Device.Set(cache.FONTLISTCACHE, assets, cache.ONEDAY)

	return assets, nil
}

func getCachedFontData() ([]*Asset, error) {
	list, OK := cache.Device.Get[[]*Asset](cache.FONTLISTCACHE)
	if !OK {
		return nil, errors.New("cache not found")
	}

	return list, nil
}

func CascadiaCode() (*Asset, error) {
	assets, err := fetchFontAssets("microsoft/cascadia-code")
	if err != nil || len(assets) != 1 {
		return nil, errors.New("no assets found")
	}

	return &Asset{
		Name:   CascadiaCodeMS,
		URL:    assets[0].URL,
		Folder: "ttf/",
	}, nil
}

func fetchFontAssets(repo string) ([]*Asset, error) {
	ctx, cancelF := context.WithTimeout(context.Background(), time.Second*time.Duration(20))
	defer cancelF()

	repoURL := "https://api.github.com/repos/" + repo + "/releases/latest"
	req, err := httplib.NewRequestWithContext(ctx, "GET", repoURL, nil)
	if err != nil {
		return nil, err
	}

View on GitHub (pinned to 0976794618)

Solutions

  1. Retry later or check network/proxy access to api.github.com.
  2. Check the microsoft/cascadia-code releases page — if the latest release now has multiple zips, wait for or pin to a release with a single asset.
  3. If rate-limited, set a GITHUB_TOKEN so requests are authenticated and less likely throttled.
  4. As a workaround, install the font manually via `oh-my-posh font install <https url to the zip>`.
Defensive patterns

Strategy: retry

Validate before calling

resp, err := http.Get("https://api.github.com/repos/microsoft/cascadia-code/releases/latest")
if err != nil || resp.StatusCode != 200 {
    // skip CascadiaCode lookup / retry later
}

Try / catch

asset, err := font.CascadiaCode()
if err != nil && err.Error() == "no assets found" {
    // fall back to manual install or a pinned URL
    asset, err = font.Download("https://github.com/microsoft/cascadia-code/releases/download/v2404.23/CascadiaCode-2404.23.zip", report)
}

Prevention

When it happens

Trigger: Calling CascadiaCode() (used by the fonts command) when the GitHub API returns an error, is rate-limited, the release has no uploaded zip assets, or microsoft/cascadia-code ships a release with more than one zip asset.

Common situations: GitHub rate limiting without auth returning an unexpected body; upstream project changing release packaging (e.g. splitting per-platform zips); network outage or corporate proxy returning an empty/HTML response.

Related errors


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