(env *execenv.Env)
| 8 | ) |
| 9 | |
| 10 | func newUserAdoptCommand(env *execenv.Env) *cobra.Command { |
| 11 | cmd := &cobra.Command{ |
| 12 | Use: "adopt USER_ID", |
| 13 | Short: "Adopt an existing identity as your own", |
| 14 | Args: cobra.ExactArgs(1), |
| 15 | PreRunE: execenv.LoadBackend(env), |
| 16 | RunE: execenv.CloseBackend(env, func(cmd *cobra.Command, args []string) error { |
| 17 | return runUserAdopt(env, args) |
| 18 | }), |
| 19 | ValidArgsFunction: completion.User(env), |
| 20 | } |
| 21 | |
| 22 | return cmd |
| 23 | } |
| 24 | |
| 25 | func runUserAdopt(env *execenv.Env, args []string) error { |
| 26 | prefix := args[0] |
no test coverage detected