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

Method RunContext

command/console.go:61–77  ·  view source on GitHub ↗
(ctx context.Context, cla *ConsoleArgs)

Source from the content-addressed store, hash-verified

59}
60
61func (c *ConsoleCommand) RunContext(ctx context.Context, cla *ConsoleArgs) int {
62 packerStarter, ret := c.GetConfig(&cla.MetaArgs)
63 if ret != 0 {
64 return ret
65 }
66
67 _ = packerStarter.Initialize(packer.InitializeOptions{
68 UseSequential: cla.UseSequential,
69 })
70
71 // Determine if stdin is a pipe. If so, we evaluate directly.
72 if c.StdinPiped() {
73 return c.modePiped(packerStarter)
74 }
75
76 return c.modeInteractive(packerStarter)
77}
78
79func (*ConsoleCommand) Help() string {
80 helpText := `

Callers 1

RunMethod · 0.95

Calls 5

modePipedMethod · 0.95
modeInteractiveMethod · 0.95
GetConfigMethod · 0.80
StdinPipedMethod · 0.80
InitializeMethod · 0.65

Tested by

no test coverage detected