{"record":{"id":"36a72c5818ff2418","repo":"argoproj/argo-workflows","slug":"expected-parameter-of-the-form-name-value-receiv","errorCode":null,"errorMessage":"expected parameter of the form: NAME=VALUE. Received: %s","messagePattern":"expected parameter of the form: NAME=VALUE\\. Received: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argo/commands/node.go","lineNumber":49,"sourceCode":"  argo node set my-wf --output-parameter parameter-name=\"Hello, world!\" --node-field-selector displayName=approve\n\n# Set the message of a node within a workflow:\n\n  argo node set my-wf --message \"We did it!\"\" --node-field-selector displayName=approve\n`,\n\t\tArgs: cobra.MinimumNArgs(2),\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif args[0] != \"set\" {\n\t\t\t\treturn fmt.Errorf(\"unknown action '%s'\", args[0])\n\t\t\t}\n\n\t\t\toutputParameters := \"\"\n\t\t\tif len(setArgs.outputParameters) > 0 {\n\t\t\t\toutputParams := make(map[string]string)\n\t\t\t\tfor _, param := range setArgs.outputParameters {\n\t\t\t\t\tparts := strings.SplitN(param, \"=\", 2)\n\t\t\t\t\tif len(parts) != 2 {\n\t\t\t\t\t\treturn fmt.Errorf(\"expected parameter of the form: NAME=VALUE. Received: %s\", param)\n\t\t\t\t\t}\n\t\t\t\t\tunquoted, err := strconv.Unquote(parts[1])\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tunquoted = parts[1]\n\t\t\t\t\t}\n\t\t\t\t\toutputParams[parts[0]] = unquoted\n\t\t\t\t}\n\t\t\t\tres, err := json.Marshal(outputParams)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"unable to parse output parameter set request: %w\", err)\n\t\t\t\t}\n\t\t\t\toutputParameters = string(res)\n\t\t\t}\n\n\t\t\tctx := cmd.Context()\n\t\t\tctx, apiClient, err := client.NewAPIClient(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn err","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/commands/node.go#L31-L67","documentation":"Each `--output-parameter` flag value must be in NAME=VALUE form; the command splits the string on the first '=' with strings.SplitN(param, \"=\", 2) and requires exactly two parts. If no '=' is present, the CLI rejects the argument before contacting the server. Note the value may itself contain '=' since SplitN limits to 2 parts.","triggerScenarios":"Running `argo node set` with `--output-parameter paramname` (missing '='), e.g. `--output-parameter myparam` instead of `--output-parameter myparam=\"value\"`.","commonSituations":"Shell quoting issues that swallow the '=' or the value; users thinking the flag takes just a parameter name; whitespace around '=' is allowed but the name part will contain it.","solutions":["Pass the parameter as NAME=VALUE, e.g. --output-parameter myparam=\"Hello, world!\".","Quote the whole argument in your shell so '=' and spaces survive, e.g. --output-parameter 'myparam=some value'.","Verify with `echo` the exact argument if a script builds it dynamically."],"exampleFix":"// before\nargo node set my-wf -p myparam --node-field-selector displayName=approve\n// after\nargo node set my-wf -p myparam=\"Hello, world!\" --node-field-selector displayName=approve","handlingStrategy":"validation","validationCode":"for p in \"${PARAMS[@]}\"; do case \"$p\" in *=*) ;; *) echo \"bad param (need NAME=VALUE): $p\"; exit 1;; esac; done","typeGuard":"func isNameValue(s string) bool { return strings.Contains(s, \"=\") && strings.Index(s, \"=\") > 0 }","tryCatchPattern":null,"preventionTips":["Always pass --output-parameter as NAME=VALUE with shell quoting around the whole argument.","Remember values may contain '=' (split is on the first '=' only).","Test the command with one simple parameter before scripting many."],"tags":["cli","argo-cli","argument-parsing"],"backgroundTag":"malformed-key-value-argument","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}