{"record":{"id":"fc0535141975b805","repo":"wavetermdev/waveterm","slug":"getdistrocmd-not-implemented-on-this-system","errorCode":null,"errorMessage":"GetDistroCmd not implemented on this system","messagePattern":"GetDistroCmd not implemented on this system","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/wsl/wsl-unix.go","lineNumber":74,"sourceCode":"\nfunc (wc *WslCmd) ExitSignal() string {\n\treturn \"\"\n}\n\nfunc (c *WslCmd) SetStdin(stdin io.Reader) {\n\tc.Stdin = stdin\n}\n\nfunc (c *WslCmd) SetStdout(stdout io.Writer) {\n\tc.Stdout = stdout\n}\n\nfunc (c *WslCmd) SetStderr(stderr io.Writer) {\n\tc.Stderr = stderr\n}\n\nfunc GetDistroCmd(ctx context.Context, wslDistroName string, cmd string) (*WslCmd, error) {\n\treturn nil, fmt.Errorf(\"GetDistroCmd not implemented on this system\")\n}\n\nfunc GetDistro(ctx context.Context, wslDistroName WslName) (*Distro, error) {\n\treturn nil, fmt.Errorf(\"GetDistro not implemented on this system\")\n}\n","sourceCodeStart":56,"sourceCodeEnd":80,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/pkg/wsl/wsl-unix.go#L56-L80","documentation":"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.","triggerScenarios":"Calling wsl.GetDistroCmd with any distro name and command string on a Linux or macOS build.","commonSituations":"Attempting to spawn a shell/command inside a WSL distro from a Unix host; unguarded cross-platform block controllers invoking WSL.","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"],"exampleFix":"// before\ncmd, err := wsl.GetDistroCmd(ctx, \"Ubuntu\", \"ls\")\n// after\nif runtime.GOOS != \"windows\" {\n    return nil, errors.New(\"wsl commands require Windows\")\n}\ncmd, err := wsl.GetDistroCmd(ctx, \"Ubuntu\", \"ls\")","handlingStrategy":"fallback","validationCode":"if runtime.GOOS != \"windows\" {\n    return errors.New(\"GetDistroCmd requires a Windows host\")\n}","typeGuard":null,"tryCatchPattern":"cmd, err := wsl.GetDistroCmd(ctx, distro, command)\nif err != nil {\n    cmd = exec.CommandContext(ctx, \"sh\", \"-c\", command) // Unix fallback\n}","preventionTips":["Route WSL command execution through a Windows-only code path","Offer SSH/local exec as the cross-platform alternative"],"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"}