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

Consider dirs crate for better cross-platform support #1509

Open
maxrake opened this issue Oct 2, 2024 · 2 comments
Open

Consider dirs crate for better cross-platform support #1509

maxrake opened this issue Oct 2, 2024 · 2 comments
Labels
enhancement New feature or request needs triage Needs to be reviewed or assigned

Comments

@maxrake
Copy link
Contributor

maxrake commented Oct 2, 2024

Consider better cross-platform support by creating/saving/updating the settings.yaml file in a more natural location for the OS. This can be accomplished with the dirs crate from crates.io. Currently, a local crate with the same name is used - cli/src/dirs.rs - and assumes Linux for the default location.

References:

@maxrake maxrake added enhancement New feature or request needs triage Needs to be reviewed or assigned labels Oct 2, 2024
@kylewillmon
Copy link
Contributor

The dirs crate was considered when moved files out of ~/.phylum.

The crate uses locations that are technically correct for each OS, but that means using the very unnatural $HOME/Library/Application Support on macOS...

Since the only concern with our current code is Windows, it probably makes more sense to update our code to use AppData on Windows rather than switching to the dirs crate for everything.

@maxrake
Copy link
Contributor Author

maxrake commented Oct 7, 2024

Reminder for possible later phylum-ci update: there is a Python package, platformdirs, that does the same thing as the dirs crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage Needs to be reviewed or assigned
Projects
None yet
Development

No branches or pull requests

2 participants