(writer io.Writer, profilePath string, useJSON bool)
| 19 | ) |
| 20 | |
| 21 | func ProfileList(writer io.Writer, profilePath string, useJSON bool) (string, error) { |
| 22 | cmd := Command("profile", "list", "--profile", profilePath) |
| 23 | if useJSON { |
| 24 | cmd.Args = append(cmd.Args, "--json") |
| 25 | } |
| 26 | out, err := cmd.Output(context.TODO()) |
| 27 | if err != nil { |
| 28 | return "", redact.Errorf("error running \"nix profile list\": %w", err) |
| 29 | } |
| 30 | return string(out), nil |
| 31 | } |
| 32 | |
| 33 | type ProfileInstallArgs struct { |
| 34 | Installables []string |
no test coverage detected