(ctx context.Context, wslDistroName string, cmd string)
| 111 | } |
| 112 | |
| 113 | func GetDistroCmd(ctx context.Context, wslDistroName string, cmd string) (*WslCmd, error) { |
| 114 | distros, err := RegisteredDistros(ctx) |
| 115 | if err != nil { |
| 116 | return nil, err |
| 117 | } |
| 118 | for _, distro := range distros { |
| 119 | if distro.Name() != wslDistroName { |
| 120 | continue |
| 121 | } |
| 122 | wrappedDistro := Distro{distro} |
| 123 | return wrappedDistro.WslCommand(ctx, cmd), nil |
| 124 | } |
| 125 | return nil, fmt.Errorf("wsl distro %s not found", wslDistroName) |
| 126 | } |
| 127 | |
| 128 | func GetDistro(ctx context.Context, wslDistroName WslName) (*Distro, error) { |
| 129 | distros, err := RegisteredDistros(ctx) |
nothing calls this directly
no test coverage detected