{"record":{"id":"0aeea2c8b5761033","repo":"multica-ai/multica","slug":"custom-env-custom-env-stdin-and-custom-env","errorCode":null,"errorMessage":"--custom-env, --custom-env-stdin, and --custom-env-file are mutually exclusive; pick one","messagePattern":"--custom-env, --custom-env-stdin, and --custom-env-file are mutually exclusive; pick one","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_agent.go","lineNumber":1262,"sourceCode":"\t// for this channel with an empty path\" and surfaces a real error below,\n\t// rather than being silently swallowed.\n\tfromFile := cmd.Flags().Changed(\"custom-env-file\")\n\n\tcount := 0\n\tif inline {\n\t\tcount++\n\t}\n\tif fromStdin {\n\t\tcount++\n\t}\n\tif fromFile {\n\t\tcount++\n\t}\n\tswitch {\n\tcase count == 0:\n\t\treturn nil, false, nil\n\tcase count > 1:\n\t\treturn nil, false, fmt.Errorf(\"--custom-env, --custom-env-stdin, and --custom-env-file are mutually exclusive; pick one\")\n\t}\n\n\tvar raw string\n\tswitch {\n\tcase inline:\n\t\traw, _ = cmd.Flags().GetString(\"custom-env\")\n\tcase fromStdin:\n\t\tbuf, err := io.ReadAll(cmd.InOrStdin())\n\t\tif err != nil {\n\t\t\treturn nil, false, fmt.Errorf(\"read --custom-env-stdin: %w\", err)\n\t\t}\n\t\traw = string(buf)\n\t\tif strings.TrimSpace(raw) == \"\" {\n\t\t\treturn nil, false, fmt.Errorf(\"--custom-env-stdin: empty input; pass '{}' to clear\")\n\t\t}\n\tcase fromFile:\n\t\tif filePath == \"\" {\n\t\t\treturn nil, false, fmt.Errorf(\"--custom-env-file: path must not be empty\")","sourceCodeStart":1244,"sourceCodeEnd":1280,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_agent.go#L1244-L1280","documentation":"Error \"--custom-env, --custom-env-stdin, and --custom-env-file are mutually exclusive; pick one\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_agent.go:1262 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only one of --custom-env, --custom-env-stdin, or --custom-env-file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}