support settings in docker plugins install

Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Victor Vieux 2016-11-07 17:43:11 -08:00
parent 58c2d938dd
commit 3f7264473d
1 changed files with 8 additions and 0 deletions

View File

@ -45,9 +45,17 @@ func (cli *Client) PluginInstall(ctx context.Context, name string, options types
return pluginPermissionDenied{name}
}
}
if len(options.Args) > 0 {
if err := cli.PluginSet(ctx, name, options.Args); err != nil {
return err
}
}
if options.Disabled {
return nil
}
return cli.PluginEnable(ctx, name)
}