Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Default keys and aliases location on non-Unix platforms #15

Closed
str4d opened this issue Oct 11, 2019 · 3 comments
Closed

Default keys and aliases location on non-Unix platforms #15

str4d opened this issue Oct 11, 2019 · 3 comments

Comments

@str4d
Copy link

str4d commented Oct 11, 2019

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:

  • Windows: C:\Users\Alice\AppData\Roaming\age tool\age\config\*
  • macOS: /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:

  • Windows: C:\Users\Alice\AppData\Roaming\age\*
  • macOS: /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)?

@str4d str4d changed the title [spec] Default key location on non-Unix platforms [spec] Default keys and aliases location on non-Unix platforms Oct 11, 2019
@danlamanna
Copy link

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 age should rely on that?

@str4d
Copy link
Author

str4d commented Oct 11, 2019

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 directories crate differs, but that's not too bad.

@Fastidious
Copy link

I think age should use $home/.config/age/ under macOS as well. Several applications share the same directory.

str4d added a commit to str4d/rage that referenced this issue Oct 15, 2019
@FiloSottile FiloSottile changed the title [spec] Default keys and aliases location on non-Unix platforms Default keys and aliases location on non-Unix platforms Nov 28, 2019
Repository owner locked and limited conversation to collaborators Apr 19, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants