Fix critical bugs: bd-169, bd-28, bd-393
- bd-169: Add -q/--quiet flag to bd init command - bd-28: Improve error handling in RemoveDependency - Now checks RowsAffected and returns error if dependency doesn't exist - New removeDependencyIfExists() helper for collision remapping - bd-393: CRITICAL - Fix auto-import skipping collisions - Auto-import was LOSING work from other workers - Now automatically remaps collisions to new IDs - Calls RemapCollisions() instead of skipping All tests pass. Amp-Thread-ID: https://ampcode.com/threads/T-cba86837-28db-47ce-94eb-67fade82376a Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -19,6 +19,8 @@ var initCmd = &cobra.Command{
|
||||
and database file. Optionally specify a custom issue prefix.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
prefix, _ := cmd.Flags().GetString("prefix")
|
||||
quiet, _ := cmd.Flags().GetBool("quiet")
|
||||
|
||||
if prefix == "" {
|
||||
// Auto-detect from directory name
|
||||
cwd, err := os.Getwd()
|
||||
@@ -66,6 +68,11 @@ and database file. Optionally specify a custom issue prefix.`,
|
||||
fmt.Fprintf(os.Stderr, "Warning: failed to close database: %v\n", err)
|
||||
}
|
||||
|
||||
// Skip output if quiet mode
|
||||
if quiet {
|
||||
return
|
||||
}
|
||||
|
||||
green := color.New(color.FgGreen).SprintFunc()
|
||||
cyan := color.New(color.FgCyan).SprintFunc()
|
||||
|
||||
@@ -79,5 +86,6 @@ and database file. Optionally specify a custom issue prefix.`,
|
||||
|
||||
func init() {
|
||||
initCmd.Flags().StringP("prefix", "p", "", "Issue prefix (default: current directory name)")
|
||||
initCmd.Flags().BoolP("quiet", "q", false, "Suppress output (quiet mode)")
|
||||
rootCmd.AddCommand(initCmd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user