MCPcopy
hub / github.com/hashicorp/packer / Run

Method Run

command/init.go:29–39  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

27}
28
29func (c *InitCommand) Run(args []string) int {
30 ctx, cleanup := handleTermInterrupt(c.Ui)
31 defer cleanup()
32
33 cfg, ret := c.ParseArgs(args)
34 if ret != 0 {
35 return ret
36 }
37
38 return c.RunContext(ctx, cfg)
39}
40
41func (c *InitCommand) ParseArgs(args []string) (*InitArgs, int) {
42 var cfg InitArgs

Callers 2

TestInitCommand_RunFunction · 0.95
TestInitCmdFunction · 0.95

Calls 4

ParseArgsMethod · 0.95
RunContextMethod · 0.95
handleTermInterruptFunction · 0.85
cleanupFunction · 0.85

Tested by 2

TestInitCommand_RunFunction · 0.76
TestInitCmdFunction · 0.76