-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add a cli parameter '--userDataArea` to set the Electron 'userData' path #13155
Conversation
Part of eclipse-theia#13107 Contributed on behalf of STMicroelectronics Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Code makes sense and works fine. I just have two rather minor comments inline.
readonly cwd: string; | ||
readonly secondInstance: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should transfer the type doc comments for secondInstance
, as it may not be obvious what that means.
createYargs(argv, process.cwd()) | ||
.command('$0 [file]', false, | ||
cmd => cmd | ||
.option('userDataArea', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using electronUserData
to clarify that this is about the Electron user data, and not to confuse with the config location (.theia
by default or defined by $THEIA_CONFIG_DIR
). WDYT?
Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me! 👍
This PR allows to set a non-default Electron
userData
path in order to allow two copies of Theia without concurrency issues related to sharedlocalStorage
etc.Part of #13107
Contributed on behalf of STMicroelectronics
What it does
Adds the relevant cli parameter.
How to test
Run two instances of Theia with different user data areas and make sure webviews work in both instances and the there are no concurrency-related issues show up in the log.
Review checklist
Reminder for reviewers