Skip to content

fix: don't panic when search_dir.path doesn't exist#101

Closed
ohlus wants to merge 1 commit intojrmoulton:mainfrom
ohlus:fix-panic-on-missing-paths
Closed

fix: don't panic when search_dir.path doesn't exist#101
ohlus wants to merge 1 commit intojrmoulton:mainfrom
ohlus:fix-panic-on-missing-paths

Conversation

@ohlus
Copy link
Contributor

@ohlus ohlus commented May 9, 2024

If paths processed by search_dirs() don't exist or shellexpand on them fails, they are ignored instead of a panic.

I'm just learning rust, so I'm not sure if this is the right way to do it, but it's working for me.

Fixes #100

@mattgallagher92
Copy link

@petersimonsson is this ready to go? I'd love this behaviour because I'm using the same config across two machines and sometimes the directories on one don't exist the other.

Copy link
Collaborator

@junglerobba junglerobba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a rebase, but otherwise this looks fine to me

}
}

if search_dirs.is_empty() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More of a usability thing, but maybe a warning here still makes sense if none of the configured search dirs actually exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panic when search_dirs.path doesn't exist

5 participants