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

[macOS] Should config and data values be swapped? #21

Open
gtrrz-victor opened this issue Jul 2, 2024 · 3 comments
Open

[macOS] Should config and data values be swapped? #21

gtrrz-victor opened this issue Jul 2, 2024 · 3 comments

Comments

@gtrrz-victor
Copy link

Based on: https://developer.apple.com/library/archive/documentation/General/Conceptual/MOSXAppProgrammingGuide/AppRuntime/AppRuntime.html

Screenshot 2024-07-02 at 4 55 50 PM

I reckon that the library is returning swapped mac values.

  • config should return data value
    ~/Library/Application Support/MyApp-nodejs instead of ~/Library/Preferences/MyApp-nodejs
  • data should return config value
    ~/Library/Preferences/MyApp-nodejs instead of ~/Library/Application Support/MyApp-nodejs

Thanks

@gtrrz-victor
Copy link
Author

In that way, it would be aligned with the Go implementation: https://pkg.go.dev/os#UserConfigDir

@gtrrz-victor
Copy link
Author

PR open with the fix: #22

@sindresorhus
Copy link
Owner

This is not correct. config could technically also have been the ~/Library/Application Support directory, but ~/Library/Preferences is more specific. It would be completely wrong to make data be ~/Library/Preferences though.

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

2 participants