specify plugin arguments before other flags

This commit is contained in:
evanboyle 2021-06-30 15:48:46 -07:00
parent 2781cf03fe
commit 01cb79dacf
2 changed files with 3 additions and 1 deletions

View file

@ -280,6 +280,7 @@ func newPlugin(ctx *Context, pwd, bin, prefix string, args, env []string, option
// execPlugin starts the plugin executable.
func execPlugin(bin string, pluginArgs []string, pwd string, env []string) (*plugin, error) {
var args []string
args = append(args, pluginArgs...)
// Flow the logging information if set.
if logging.LogFlow {
if logging.LogToStderr {
@ -293,7 +294,6 @@ func execPlugin(bin string, pluginArgs []string, pwd string, env []string) (*plu
if cmdutil.TracingEndpoint != "" && !cmdutil.TracingToFile {
args = append(args, "--tracing", cmdutil.TracingEndpoint)
}
args = append(args, pluginArgs...)
cmd := exec.Command(bin, args...)
cmdutil.RegisterProcessGroup(cmd)

View file

@ -892,6 +892,8 @@ func optsForConstructNode(t *testing.T, expectedResourceCount int, env ...string
},
Quick: true,
NoParallel: true,
// verify that additional flags don't cause the component provider hang
UpdateCommandlineFlags: []string{"--logflow", "--logtostderr"},
ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) {
assert.NotNil(t, stackInfo.Deployment)
if assert.Equal(t, expectedResourceCount, len(stackInfo.Deployment.Resources)) {