Consider dirs crate for better cross-platform support #1509
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestneeds triageNeeds to be reviewed or assignedNeeds to be reviewed or assigned
Description
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:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestneeds triageNeeds to be reviewed or assignedNeeds to be reviewed or assigned
Activity
kylewillmon commentedon Oct 2, 2024
The
dirscrate 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 Supporton macOS...Since the only concern with our current code is Windows, it probably makes more sense to update our code to use
AppDataon Windows rather than switching to thedirscrate for everything.maxrake commentedon Oct 7, 2024
Reminder for possible later
phylum-ciupdate: there is a Python package,platformdirs, that does the same thing as thedirscrate.