Skip to content

Improve error handling and fix typo in cd command implementation #12

@coderabbitai

Description

@coderabbitai

Description

The cd command implementation for absolute paths needs improved error handling and has a typo that should be addressed.

Issues to Address

  1. Missing error message: When a path doesn't exist or isn't a directory, no error message is printed to the user
  2. Typo: There's a "or or" typo that should be corrected to "or"
  3. Misleading error message: When set_current_dir fails after confirming the path exists and is a directory, the error message may be misleading (likely a permissions issue rather than path not found)

Context

This issue was identified during code review of PR #11 which implements cd navigation for absolute paths.

Backlinks:

Affected File

src/main.rs - the cd command handling branch for absolute paths

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions