(env *execenv.Env)
| 10 | ) |
| 11 | |
| 12 | func newPushCommand(env *execenv.Env) *cobra.Command { |
| 13 | cmd := &cobra.Command{ |
| 14 | Use: "push [REMOTE]", |
| 15 | Short: "Push updates to a git remote", |
| 16 | PreRunE: execenv.LoadBackend(env), |
| 17 | RunE: execenv.CloseBackend(env, func(cmd *cobra.Command, args []string) error { |
| 18 | return runPush(env, args) |
| 19 | }), |
| 20 | ValidArgsFunction: completion.GitRemote(env), |
| 21 | } |
| 22 | |
| 23 | return cmd |
| 24 | } |
| 25 | |
| 26 | func runPush(env *execenv.Env, args []string) error { |
| 27 | if len(args) > 1 { |
no test coverage detected