wavetermdev/waveterm · error
GetDistroCmd not implemented on this system
Error message
GetDistroCmd not implemented on this system
What it means
Stub error: GetDistroCmd has no implementation on Unix systems. Only the Windows build can locate the wsl.exe command for a distro; on Unix the function returns this not-implemented error.
Source
Thrown at pkg/wsl/wsl-unix.go:74
func (wc *WslCmd) ExitSignal() string {
return ""
}
func (c *WslCmd) SetStdin(stdin io.Reader) {
c.Stdin = stdin
}
func (c *WslCmd) SetStdout(stdout io.Writer) {
c.Stdout = stdout
}
func (c *WslCmd) SetStderr(stderr io.Writer) {
c.Stderr = stderr
}
func GetDistroCmd(ctx context.Context, wslDistroName string, cmd string) (*WslCmd, error) {
return nil, fmt.Errorf("GetDistroCmd not implemented on this system")
}
func GetDistro(ctx context.Context, wslDistroName WslName) (*Distro, error) {
return nil, fmt.Errorf("GetDistro not implemented on this system")
}
View on GitHub (pinned to a4447c1563)
Solutions
- Only call GetDistroCmd on Windows builds (runtime.GOOS check)
- Use a regular local or SSH command runner on Unix systems
- Hide/disable WSL block types in the UI on non-Windows platforms
Example fix
// before
cmd, err := wsl.GetDistroCmd(ctx, "Ubuntu", "ls")
// after
if runtime.GOOS != "windows" {
return nil, errors.New("wsl commands require Windows")
}
cmd, err := wsl.GetDistroCmd(ctx, "Ubuntu", "ls") Defensive patterns
Strategy: fallback
Validate before calling
if runtime.GOOS != "windows" {
return errors.New("GetDistroCmd requires a Windows host")
} Try / catch
cmd, err := wsl.GetDistroCmd(ctx, distro, command)
if err != nil {
cmd = exec.CommandContext(ctx, "sh", "-c", command) // Unix fallback
} Prevention
- Route WSL command execution through a Windows-only code path
- Offer SSH/local exec as the cross-platform alternative
When it happens
Trigger: Calling wsl.GetDistroCmd with any distro name and command string on a Linux or macOS build.
Common situations: Attempting to spawn a shell/command inside a WSL distro from a Unix host; unguarded cross-platform block controllers invoking WSL.
Related errors
- RegisteredDistros not implemented on this system
- DefaultDistro not implemented on this system
- GetDistro not implemented on this system
- No tab view found for the given webContents id
- User redirected to docsite to learn more about ARM64 transla
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/fc0535141975b805.
Report an issue: GitHub.