MCPcopy Index your code
hub / github.com/jetify-com/devbox / ProfileList

Function ProfileList

internal/nix/profiles.go:21–31  ·  view source on GitHub ↗
(writer io.Writer, profilePath string, useJSON bool)

Source from the content-addressed store, hash-verified

19)
20
21func 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
33type ProfileInstallArgs struct {
34 Installables []string

Callers 2

ProfileListItemsFunction · 0.92
profileListLegacyFunction · 0.92

Calls 3

ErrorfFunction · 0.92
CommandFunction · 0.70
OutputMethod · 0.45

Tested by

no test coverage detected