fix: git credential migration state storage path#9549
Conversation
|
|
||
| const MIGRATION_KEY = 'GIT_CREDENTIALS_MIGRATION'; | ||
|
|
||
| const migrationStorage = initElectronStorage(); |
There was a problem hiding this comment.
We initialize storage directly when this file is loaded. So the path is always point to Insomnia path
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the git credential migration system where the electron storage was being initialized before the user data path was properly set. The fix implements lazy initialization of the electron storage instance to ensure it's only created when first needed, after the application has set the correct user data path.
Key Changes:
- Converted eager initialization to lazy initialization pattern for electron storage
- Added a
getElectronStorage()helper function that implements the singleton pattern
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
✅ Circular References ReportGenerated at: 2026-01-08T08:04:50.338Z Summary
Click to view all circular references in PR (167)Click to view all circular references in base branch (167)Analysis✅ No Change: This PR does not introduce or remove any circular references. This report was generated automatically by comparing against the |
Init electronStorage after we set the
userdatapath.