(ctx context.Context, osArchStr string)
| 84 | } |
| 85 | |
| 86 | func GetClientPlatformFromOsArchStr(ctx context.Context, osArchStr string) (string, string, error) { |
| 87 | parts := strings.Fields(strings.TrimSpace(osArchStr)) |
| 88 | if len(parts) != 2 { |
| 89 | return "", "", fmt.Errorf("unexpected output from uname: %s", osArchStr) |
| 90 | } |
| 91 | os, arch := normalizeOs(parts[0]), normalizeArch(parts[1]) |
| 92 | if err := wavebase.ValidateWshSupportedArch(os, arch); err != nil { |
| 93 | return "", "", err |
| 94 | } |
| 95 | return os, arch, nil |
| 96 | } |
| 97 | |
| 98 | type CancellableCmd struct { |
| 99 | Cmd *wsl.WslCmd |
no test coverage detected