Default keys and aliases location on non-Unix platforms #254
Replies: 4 comments
-
FWIW, It looks like the Go team had a lot of discussion on this topic for the 1.13 release and produced os.UserConfigDir. Perhaps |
Beta Was this translation helpful? Give feedback.
-
I scanned the discussion there and it seems like a reasonable approach. For my Rust impl to be compatible I'd need to manually detect macOS and handle it separately because of how the |
Beta Was this translation helpful? Give feedback.
-
I think |
Beta Was this translation helpful? Give feedback.
-
For the record, we ended up removing the |
Beta Was this translation helpful? Give feedback.
-
The specification gives the Unix path
~/.config/age/*
as the default location it looks for keys and aliases. How should this map to Windows and macOS? The directories Rust crate (which aims to follow per-OS conventions) appears to indicate the following as being approximately OS-shaped:C:\Users\Alice\AppData\Roaming\age tool\age\config\*
/Users/Alice/Library/Preferences/com.age-tool.age/*
We could also go simpler by just using the known folders for program settings as the base:
C:\Users\Alice\AppData\Roaming\age\*
/Users/Alice/Library/Preferences/age/*
Thoughts? Is there somewhere else these should go? Are users expected to be editing these by hand (in which case maybe a Documents-like folder should be used, which is more accessible)?
Beta Was this translation helpful? Give feedback.
All reactions