RunPluginHooks is the entrypoint for the hooks execution flow after a plugin command was just executed by the CLI.
(ctx context.Context, dockerCLI config.Provider, rootCmd, subCommand *cobra.Command, args []string, cmdErrorMessage string)
| 42 | // RunPluginHooks is the entrypoint for the hooks execution flow |
| 43 | // after a plugin command was just executed by the CLI. |
| 44 | func RunPluginHooks(ctx context.Context, dockerCLI config.Provider, rootCmd, subCommand *cobra.Command, args []string, cmdErrorMessage string) { |
| 45 | commandName := strings.Join(args, " ") |
| 46 | flags := getNaiveFlags(args) |
| 47 | |
| 48 | runHooks(ctx, dockerCLI.ConfigFile(), rootCmd, subCommand, commandName, flags, cmdErrorMessage) |
| 49 | } |
| 50 | |
| 51 | func runHooks(ctx context.Context, cfg *configfile.ConfigFile, rootCmd, subCommand *cobra.Command, invokedCommand string, flags map[string]string, cmdErrorMessage string) { |
| 52 | nextSteps := invokeAndCollectHooks(ctx, cfg, rootCmd, subCommand, invokedCommand, flags, cmdErrorMessage) |
searching dependent graphs…