Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop the home dependency? #62

Closed
nickelc opened this issue Apr 25, 2023 · 2 comments
Closed

Drop the home dependency? #62

nickelc opened this issue Apr 25, 2023 · 2 comments

Comments

@nickelc
Copy link
Contributor

nickelc commented Apr 25, 2023

This crate supports the Base Directory spec only for unix & redox and not windows.
And the home crate basically boils down to calling std::env::home_dir() for the supported targets.

home source

#[cfg(any(unix, target_os = "redox"))]
fn home_dir_inner() -> Option<PathBuf> {
    #[allow(deprecated)]
    std::env::home_dir()
}

Would it not make sense to just drop it and switch back to std::env::home_dir() when the function is only deprecated because the function's behavior may be unexpected on Windows?

@whitequark
Copy link
Owner

I think it makes more sense to return %USERPROFILE% or the result of GetUserProfileDirectory and skip %HOME% on Windows.

@utkarshgupta137
Copy link
Contributor

Yeah, if Windows support is not planned, then might as well remove the home dep.

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

No branches or pull requests

3 participants