gastownhall/beads · error
cannot use both --ephemeral and --pour
Error message
cannot use both --ephemeral and --pour
What it means
bd mol bond accepts either --ephemeral (bond without persisting a pour target) or --pour, but not both; gatherMolBondInput rejects the conflicting combination at flag-parse time.
Source
Thrown at cmd/bd/mol_bond.go:187
customTitle string
dryRun bool
vars map[string]string
ephemeral bool
pour bool
childRef string
}
func gatherMolBondInput(cmd *cobra.Command, args []string) (molBondInput, error) {
in := molBondInput{argA: args[0], argB: args[1]}
in.bondType, _ = cmd.Flags().GetString("type")
in.customTitle, _ = cmd.Flags().GetString("as")
in.dryRun, _ = cmd.Flags().GetBool("dry-run")
in.ephemeral, _ = cmd.Flags().GetBool("ephemeral")
in.pour, _ = cmd.Flags().GetBool("pour")
in.childRef, _ = cmd.Flags().GetString("ref")
if in.ephemeral && in.pour {
return in, fmt.Errorf("cannot use both --ephemeral and --pour")
}
if in.bondType != types.BondTypeSequential && in.bondType != types.BondTypeParallel && in.bondType != types.BondTypeConditional {
return in, fmt.Errorf("invalid bond type '%s', must be: sequential, parallel, or conditional", in.bondType)
}
varFlags, _ := cmd.Flags().GetStringArray("var")
vars, err := parseVarFlags(varFlags)
if err != nil {
return in, err
}
in.vars = vars
return in, nil
}
func renderMolBondDryRun(in molBondInput, issueA *types.Issue, formulaA string, issueB *types.Issue, formulaB string) {
idA := in.argA
idB := in.argB
aIsProto := falseView on GitHub (pinned to 71377f2769)
Solutions
- Remove one of the two flags: use --pour to persist the pour, or --ephemeral for a non-persisted bond.
- If a wrapper script sets flags conditionally, ensure the two branches are mutually exclusive (if/else, not both).
- Run `bd mol bond --help` to confirm which mode you intend.
Example fix
// before (wrapper script) FLAGS="$FLAGS --ephemeral --pour" // after if [ "$PERSIST" = "1" ]; then FLAGS="$FLAGS --pour"; else FLAGS="$FLAGS --ephemeral"; fi
Defensive patterns
Strategy: validation
Validate before calling
# shell pre-check if [ -n "$EPHEMERAL" ] && [ -n "$POUR" ]; then echo "choose --ephemeral OR --pour"; exit 1; fi
Prevention
- Treat --ephemeral and --pour as mutually exclusive modes.
- In wrapper scripts, use if/else so only one flag is ever appended.
- Check `bd mol bond --help` for current flag semantics.
When it happens
Trigger: Running `bd mol bond ... --ephemeral --pour` — both boolean flags set on the same invocation.
Common situations: Script or shell alias accumulating flags, or a user unsure of the semantics passing both to be safe.
Related errors
- invalid bond type '%s', must be: sequential, parallel, or co
- cannot use multiple conflict resolution flags
- --proxied-server-root-path requires --proxied-server
- --proxied-server-root-path must be an absolute path, got %q
- --proxied-server-root-path %v
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/21aad78abe9dc332.
Report an issue: GitHub.