-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commands: introduce plugin as alias to plugins
- Loading branch information
1 parent
34b1baf
commit 45d0ee2
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package command | ||
|
||
import ( | ||
"strings" | ||
|
||
"github.com/mitchellh/cli" | ||
) | ||
|
||
type PluginCommand struct { | ||
Meta | ||
} | ||
|
||
func (c *PluginCommand) Synopsis() string { | ||
return "Alias to `packer plugins` - Interact with Packer plugins and catalog" | ||
} | ||
|
||
func (c *PluginCommand) Help() string { | ||
helpText := ` | ||
Usage: packer plugin <subcommand> [options] [args] | ||
This command groups subcommands for interacting with Packer plugins. | ||
Related but not under the "plugin" command : | ||
- "packer init <path>" will install all plugins required by a config. | ||
` | ||
|
||
return strings.TrimSpace(helpText) | ||
} | ||
|
||
func (c *PluginCommand) Run(args []string) int { | ||
return cli.RunResultHelp | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters