Skip to content

Commit af56481

Browse files
author
auto-coder (deepseek-chat)
committed
fix: error on empty file removal
- Return an error when no files are found to remove Signed-off-by: auto-coder (deepseek-chat) <auto-coder@ai.terminal>
1 parent e428596 commit af56481

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/ui/coders/commands.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,11 @@ func (c *CommandExecutor) remove(_ context.Context, input string) error {
347347
}
348348
}
349349

350+
// Check if any files were actually removed
351+
if deleteCount == 0 {
352+
return errbook.New("No matching files found to remove")
353+
}
354+
350355
return nil
351356
}
352357

0 commit comments

Comments
 (0)