Description
Currently, we can only get a few env variables when refer to the mannual here.
So other extensions may access the path of extension and data dir in their code like this:
let settingsPath = path.join(process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE, 'commandbar.json');
And we can run vscode with command-line parameters here.
If we specify the following options(for example, we can make it portable), we may change the extension and data dir settings.
--extensions-dir <dir> Set the root path for extensions.
--user-data-dir <dir> Specifies the directory that user data is kept in, useful when running as root.
But other extensions cann't realize the changes, so it may fails. This issue may be solved when env variables of extension-dir and data-dir exposed.
VSCode v1.23.0 x64(on Win10)
Activity
shanalikhan commentedon Jul 22, 2018
I need to support Settings Sync as portable mode.
It would be great if you guys just expose these paths, currently i'm looking to solution that is not feasible though but will work
tmeckel commentedon Nov 22, 2018
Settings sync doesn't still work with VSCode when the
--user-data-dir=command line parameter is used.jrieken commentedon Nov 10, 2020
/duplicate of #2741
vscode-triage-bot commentedon Nov 10, 2020
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.
Happy Coding!