langpuppet: Fix Cli method invocations for wrapped GAPIs
Since the langpuppet GAPI creates fresh new CliContext objects, it has to make sure to provide the original parent context, because the child GAPIs expect to be able to access its data.
This commit is contained in:
@@ -123,13 +123,13 @@ func (obj *GAPI) Cli(cliInfo *gapi.CliInfo) (*gapi.Deploy, error) {
|
|||||||
var langDeploy *gapi.Deploy
|
var langDeploy *gapi.Deploy
|
||||||
var puppetDeploy *gapi.Deploy
|
var puppetDeploy *gapi.Deploy
|
||||||
langCliInfo := &gapi.CliInfo{
|
langCliInfo := &gapi.CliInfo{
|
||||||
CliContext: cli.NewContext(c.App, flagSet, nil),
|
CliContext: cli.NewContext(c.App, flagSet, c.Parent()),
|
||||||
Fs: fs,
|
Fs: fs,
|
||||||
Debug: debug,
|
Debug: debug,
|
||||||
Logf: logf, // TODO: wrap logf?
|
Logf: logf, // TODO: wrap logf?
|
||||||
}
|
}
|
||||||
puppetCliInfo := &gapi.CliInfo{
|
puppetCliInfo := &gapi.CliInfo{
|
||||||
CliContext: cli.NewContext(c.App, flagSet, nil),
|
CliContext: cli.NewContext(c.App, flagSet, c.Parent()),
|
||||||
Fs: fs,
|
Fs: fs,
|
||||||
Debug: debug,
|
Debug: debug,
|
||||||
Logf: logf, // TODO: wrap logf?
|
Logf: logf, // TODO: wrap logf?
|
||||||
|
|||||||
Reference in New Issue
Block a user