fix(prime): add --state flag exclusivity validation
The --state flag is meant for quick state checks and cannot be combined with --hook, --dry-run, or --explain flags. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -81,6 +81,11 @@ func init() {
|
||||
type RoleContext = RoleInfo
|
||||
|
||||
func runPrime(cmd *cobra.Command, args []string) error {
|
||||
// Validate flag combinations: --state is exclusive
|
||||
if primeState && (primeHookMode || primeDryRun || primeExplain) {
|
||||
return fmt.Errorf("--state cannot be combined with other flags")
|
||||
}
|
||||
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
return fmt.Errorf("getting current directory: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user