wavetermdev/waveterm · error

RegisteredDistros not implemented on this system

Error message

RegisteredDistros not implemented on this system

What it means

RegisteredDistros in wsl-unix.go is the non-Windows stub of the WSL integration. WSL only exists on Windows, so on Linux/macOS this function always returns this error instead of listing installed WSL distributions.

Source

Thrown at pkg/wsl/wsl-unix.go:21

// Copyright 2025, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0

package wsl

import (
	"context"
	"fmt"
	"io"
	"os"
	"os/exec"
)

type WslName struct {
	Distro string `json:"distro"`
}

func RegisteredDistros(ctx context.Context) (distros []Distro, err error) {
	return nil, fmt.Errorf("RegisteredDistros not implemented on this system")
}

func DefaultDistro(ctx context.Context) (d Distro, ok bool, err error) {
	return d, false, fmt.Errorf("DefaultDistro not implemented on this system")
}

type Distro struct{}

func (d *Distro) Name() string {
	return ""
}

func (d *Distro) WslCommand(ctx context.Context, cmd string) *WslCmd {
	return nil
}

// just use the regular cmd since it's
// similar enough to not cause issues

View on GitHub (pinned to a4447c1563)

Solutions

  1. Only invoke WSL commands on Windows builds — gate with runtime.GOOS == "windows" before calling
  2. On Unix systems, use native shell/SSH connections instead of WSL blocks
  3. Treat the error as expected behavior and surface 'WSL is only available on Windows' in UI/CLI

Example fix

// before
distros, err := wsl.RegisteredDistros(ctx)
// after
if runtime.GOOS != "windows" {
    return fmt.Errorf("WSL is only available on Windows")
}
distros, err := wsl.RegisteredDistros(ctx)
Defensive patterns

Strategy: fallback

Validate before calling

if runtime.GOOS != "windows" {
    return errors.New("WSL listing unavailable: not a Windows host")
}

Try / catch

distros, err := wsl.RegisteredDistros(ctx)
if err != nil {
    distros = nil // non-Windows host: fall back to native connections
}

Prevention

When it happens

Trigger: Calling wsl.RegisteredDistros (directly or via the WslListCommand RPC) on a Linux or macOS build of Wave.

Common situations: Users running wsh/waveterm on Linux/macOS invoking WSL block commands; cross-platform code paths not gated by runtime.GOOS.

Related errors


AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01). Data as JSON: /api/errors/86cad760c48cec34. Report an issue: GitHub.