{"record":{"id":"8023c0f8e9e43e5e","repo":"wavetermdev/waveterm","slug":"defaultdistro-not-implemented-on-this-system","errorCode":null,"errorMessage":"DefaultDistro not implemented on this system","messagePattern":"DefaultDistro not implemented on this system","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/wsl/wsl-unix.go","lineNumber":25,"sourceCode":"\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n)\n\ntype WslName struct {\n\tDistro string `json:\"distro\"`\n}\n\nfunc RegisteredDistros(ctx context.Context) (distros []Distro, err error) {\n\treturn nil, fmt.Errorf(\"RegisteredDistros not implemented on this system\")\n}\n\nfunc DefaultDistro(ctx context.Context) (d Distro, ok bool, err error) {\n\treturn d, false, fmt.Errorf(\"DefaultDistro not implemented on this system\")\n}\n\ntype Distro struct{}\n\nfunc (d *Distro) Name() string {\n\treturn \"\"\n}\n\nfunc (d *Distro) WslCommand(ctx context.Context, cmd string) *WslCmd {\n\treturn nil\n}\n\n// just use the regular cmd since it's\n// similar enough to not cause issues\n// type WslCmd = exec.Cmd\ntype WslCmd struct {\n\texec.Cmd\n}","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/pkg/wsl/wsl-unix.go#L7-L43","documentation":"Stub error: the WSL DefaultDistro accessor has no implementation on non-Windows (Unix) systems. The wsl-unix build provides the WSL API surface but these operations only exist on Windows, so calling DefaultDistro returns this not-implemented error.","triggerScenarios":"Calling wsl.DefaultDistro (or the WslDefaultDistroCommand RPC) on a Linux or macOS build.","commonSituations":"Code or UI trying to resolve the default WSL distro to open a connection without checking the platform; automated tests run on Linux CI.","solutions":["Gate calls behind runtime.GOOS == \"windows\"","On Windows, ensure WSL is installed if you also hit the Windows variant of this failure","Skip WSL-dependent tests/features on non-Windows hosts"],"exampleFix":"// before\nd, ok, err := wsl.DefaultDistro(ctx)\n// after\nif runtime.GOOS != \"windows\" {\n    return errors.New(\"WSL default distro requires Windows\")\n}\nd, ok, err := wsl.DefaultDistro(ctx)","handlingStrategy":"fallback","validationCode":"if runtime.GOOS != \"windows\" {\n    return errors.New(\"no default WSL distro on non-Windows hosts\")\n}","typeGuard":null,"tryCatchPattern":"d, ok, err := wsl.DefaultDistro(ctx)\nif err != nil || !ok {\n    // non-Windows (or WSL absent): use local/SSH connection instead\n}","preventionTips":["Check the platform before resolving a WSL default distro","On Windows also verify WSL is installed before relying on a default"],"tags":["wsl","platform","unsupported"],"backgroundTag":"platform-not-supported","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}