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

.hyper config location for macOS is incorrect in website #6616

Closed
2 tasks done
dheerajkysetti opened this issue Jun 26, 2022 · 2 comments
Closed
2 tasks done

.hyper config location for macOS is incorrect in website #6616

dheerajkysetti opened this issue Jun 26, 2022 · 2 comments

Comments

@dheerajkysetti
Copy link

  • I am on the latest Hyper.app 3.2.3 macOS arm64
  • I have searched the issues of this repo and believe that this is not a duplicate
  • OS 12.4 and macOS monterey M1:
  • Hyper.app 3.2.3:
  • default .hyper.js config:
  • The issue is reproducible in vanilla Hyper.app:

Issue

In the hyper.is website, when opened on a macOS m1(monterey), the configuration section shows
image

But the .hyper.js file in the ~/Library/Application Support/Hyper/.hyper.js is never read.
Only the ~/.hyper.js file works.

Taking a look at the code at tag 3.2.3

// If the user defines XDG_CONFIG_HOME they definitely want their config there,
// otherwise use the home directory in linux/mac and userdata in windows
const applicationDirectory =
process.env.XDG_CONFIG_HOME !== undefined
? join(process.env.XDG_CONFIG_HOME, 'hyper')
: process.platform == 'win32'
? app.getPath('userData')
: homedir();

The user directory does point to mac.

Does the website need to update the documentation or the code require a change to match the documentation?

@maxdevjs
Copy link

maxdevjs commented Sep 26, 2022

(This also happens for Linux when XDG_CONFIG_HOME is not explicitly set) @dheerajkysetti check if your XDG_CONFIG_HOME is set

$ echo $XDG_CONFIG_HOME

Also, please check #6789 to verify if that behavior currently happen also on Mac. Thank you.

Edit: the documentation on the site is correct, as I point out in the issue that I opened, the actual 'issue' is another.

@17hao
Copy link

17hao commented Feb 28, 2024

@maxdevjs
It is not necessary to set XDG_CONFIG_HOME explicitly, the default value is $HOME/.config.

$XDG_CONFIG_HOME defines the base directory relative to which user-specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html

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

3 participants