| 39 | } |
| 40 | |
| 41 | func (c *PluginsInstallCommand) Help() string { |
| 42 | helpText := ` |
| 43 | Usage: packer plugins install [OPTIONS...] <plugin> [<version constraint>] |
| 44 | |
| 45 | This command will install the most recent compatible Packer plugin matching |
| 46 | version constraint. |
| 47 | When the version constraint is omitted, the most recent version will be |
| 48 | installed. |
| 49 | |
| 50 | Ex: packer plugins install github.com/hashicorp/happycloud v1.2.3 |
| 51 | packer plugins install --path ./packer-plugin-happycloud "github.com/hashicorp/happycloud" |
| 52 | |
| 53 | Options: |
| 54 | -path <path> Install the plugin from a locally-sourced plugin binary. |
| 55 | This installs the plugin where a normal invocation would, but will |
| 56 | not try to download it from a remote location, and instead |
| 57 | install the binary in the Packer plugins path. This option cannot |
| 58 | be specified with a version constraint. |
| 59 | -force Forces reinstallation of plugins, even if already installed. |
| 60 | ` |
| 61 | |
| 62 | return strings.TrimSpace(helpText) |
| 63 | } |
| 64 | |
| 65 | func (c *PluginsInstallCommand) Run(args []string) int { |
| 66 | ctx, cleanup := handleTermInterrupt(c.Ui) |