multica-ai/multica · error
--clear cannot be combined with --description / --descriptio
Error message
--clear cannot be combined with --description / --description-stdin / --description-file
What it means
`multica user profile update` rejects the combination of the --clear flag with any of --description, --description-stdin, or --description-file. Clearing and setting a value in one invocation is ambiguous, so the command refuses rather than picking a winner.
Source
Thrown at server/cmd/multica/cmd_user.go:102
}
printUserProfileTable(os.Stdout, me)
return nil
}
func runUserProfileUpdate(cmd *cobra.Command, _ []string) error {
// `--clear` is its own flag (not "pass an empty string") because cobra's
// default value for a Changed("") flag would otherwise be ambiguous with
// "user typed `--description ""`". Keep both forms supported — the inline
// empty string is what someone scripting bash would reach for.
clearFlag, _ := cmd.Flags().GetBool("clear")
desc, hasDesc, err := resolveTextFlag(cmd, "description")
if err != nil {
return err
}
if clearFlag && hasDesc {
return fmt.Errorf("--clear cannot be combined with --description / --description-stdin / --description-file")
}
if !clearFlag && !hasDesc && !cmd.Flags().Changed("description") {
return fmt.Errorf("nothing to update; pass --description, --description-stdin, --description-file, or --clear")
}
if clearFlag {
desc = ""
}
body := map[string]any{"profile_description": desc}
client, err := newAPIClient(cmd)
if err != nil {
return err
}
ctx, cancel := cli.APIContext(context.Background())
defer cancel()View on GitHub (pinned to 2c0912b6ec)
Solutions
- Split into two steps: run `--clear` alone, then a second command with the new --description.
- If the intent is to replace the description, drop --clear and just pass --description.
- Audit shell scripts for unconditional --clear alongside a description flag.
Example fix
# before multica user profile update --clear --description "new bio" # after multica user profile update --description "new bio"
Defensive patterns
Strategy: validation
Validate before calling
if [ -n "$DESC" ] && [ "$CLEAR" = "true" ]; then echo 'cannot combine --clear with a description'; exit 1; fi
Prevention
- Model --clear and --description as mutually exclusive in flag-parsing scripts.
- Build CLI args arrays conditionally instead of concatenating flags unconditionally.
When it happens
Trigger: Running e.g. `multica user profile update --clear --description "bio"`, or --clear together with --description-stdin/-file. resolveTextFlag reports hasDesc=true whenever any of the three description flag variants was supplied.
Common situations: Shell scripts that append flags conditionally end up emitting both --clear and --description in the same invocation; copy-pasted command lines from runbooks.
Related errors
- nothing to update; pass --description, --description-stdin,
- download timeout must be greater than zero
- --name is required
- --slug is required
- --issue-prefix cannot be empty; omit it to use the server-ge
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/d76daa07e94c2223.
Report an issue: GitHub.