fix(swarm): Remove non-existent --mol-type flag from bd update
gt swarm create was failing when using a pre-existing epic because it tried to call `bd update --mol-type=swarm`, but bd update doesn't support the --mol-type flag. Fix: Only set mol-type during bd create (when epic doesn't exist. Pre-existing epics work as-is since swarm functionality doesn't depend on the mol-type field. Closes gt-zqt4d 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> EOF )
This commit is contained in:
@@ -236,16 +236,8 @@ func runSwarmCreate(cmd *cobra.Command, args []string) error {
|
||||
beadsPath := r.BeadsPath()
|
||||
checkCmd := exec.Command("bd", "show", swarmEpic, "--json")
|
||||
checkCmd.Dir = beadsPath
|
||||
if err := checkCmd.Run(); err == nil {
|
||||
// Epic exists, update it to be a swarm molecule
|
||||
updateArgs := []string{"update", swarmEpic, "--mol-type=swarm"}
|
||||
updateCmd := exec.Command("bd", updateArgs...)
|
||||
updateCmd.Dir = beadsPath
|
||||
if err := updateCmd.Run(); err != nil {
|
||||
return fmt.Errorf("updating epic to swarm molecule: %w", err)
|
||||
}
|
||||
} else {
|
||||
// Create new swarm epic
|
||||
if err := checkCmd.Run(); err != nil {
|
||||
// Epic doesn't exist, create it as a swarm molecule
|
||||
createArgs := []string{
|
||||
"create",
|
||||
"--type=epic",
|
||||
|
||||
Reference in New Issue
Block a user