.hyper_plugins and .hyper.js location when XDG_CONFIG_HOME is not set (or is set but Hyper still searches for wrong location) and potential fix
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 44.7k
- Forks
- 3.6k
- Avg merge
- 21m
- Merged PRs (30d)
- 1
Description
- [ x] I am on the latest Hyper.app version
- [ x] I have searched the issues of this repo and believe that this is not a duplicate
I found at least https://github.com/vercel/hyper/issues/6616 (for Mac). Nonetheless, I am opening this issue for Linux and as a clarification on the root cause.
- (irrelevant in this case) OS version and name: Solus 4.3 Fortitude
- Hyper.app version: 3.0.0
- (irrelevant in this case) Link of a Gist with the contents of your .hyper.js:
- Relevant information from devtools (CMD+ALT+I on macOS, CTRL+SHIFT+I elsewhere):
- The issue is reproducible in vanilla Hyper.app: with downloaded
Hyper-3.3.0.AppImageand not "patched" cloned repo
Issue
Related to https://github.com/vercel/hyper/issues/6616
TLDR: relevant spot is https://github.com/vercel/hyper/blob/ef5419b5200a04b244e9d507baf6f4e5cf5bad9c/app/config/paths.ts#L16
The downloaded Hyper-3.3.0.AppImage creates $HOME/.config/Hyper (capitalized Hyper)
-
probably it checks for
$HOME/.config/hyper(lowercaseh) as per
https://github.com/vercel/hyper/blob/ef5419b5200a04b244e9d507baf6f4e5cf5bad9c/app/config/paths.ts#L16- it fails to find
$HOME/.config/Hyper(searches for$HOME/.config/hyper(lowercaseh))- then creates both
.hyper_pluginsand.hyper.jsalso ifXDG_CONFIG_HOMEis set
- then creates both
- it fails to find
-
same behavior found in cloned repo
- until when https://github.com/vercel/hyper/blob/ef5419b5200a04b244e9d507baf6f4e5cf5bad9c/app/config/paths.ts#L16 is updated to
? join(process.env.XDG_CONFIG_HOME, 'Hyper')(capitalizedHyper)
- until when https://github.com/vercel/hyper/blob/ef5419b5200a04b244e9d507baf6f4e5cf5bad9c/app/config/paths.ts#L16 is updated to
At this point both .hyper_plugins and .hyper.js are correctly created in XDG_CONFIG_HOME/Hyper, correct configuration and plugins are loaded.
I pushed the fix to my fork. If all this is correct (both Linux and Mac), I'd like to send a PR.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in app/config/paths.ts at the XDG_CONFIG_HOME path logic and compare the searched directory with the Hyper-3.3.0.AppImage behavior. Reproduce with and without XDG_CONFIG_HOME, then verify that .hyper_plugins and .hyper.js are created and loaded from XDG_CONFIG_HOME/Hyper with the expected capitalization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100