GetCommandWithDeps returns the run command structure with injectable dependencies.
(wsl wsllib.WslLib)
| 91 | |
| 92 | // GetCommandWithDeps returns the run command structure with injectable dependencies. |
| 93 | func GetCommandWithDeps(wsl wsllib.WslLib) cmdline.Command { |
| 94 | return cmdline.Command{ |
| 95 | Names: []string{"run", "-c", "/c"}, |
| 96 | Visible: func(distroName string) bool { |
| 97 | return wsl.IsDistributionRegistered(distroName) |
| 98 | }, |
| 99 | HelpText: getHelpMessage, |
| 100 | Run: func(name string, args []string) error { |
| 101 | return execute(wsl, name, args) |
| 102 | }, |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | // GetCommandP returns the runp command structure |
| 107 | func GetCommandP() cmdline.Command { |