vscode: Portable mode: VSCODE_PORTABLE not available for uninstall script
- VSCode Version: 1.25.1
- OS Version: Any
Steps to Reproduce:
- Uninstall any extension that provides a
vscode:uninstallscript - Inspect
process.env. process.env.VSCODE_PORTABLEis missing
Does this issue occur when all extensions are disabled?: Yes
When trying to support Portable Mode on vscode-icons, process.env.VSCODE_PORTABLE is very handy to determine if the vscode instance is started in portable mode (thus finding where the user-data directory is). Unfortunately the same can not be achieved for the uninstall script.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 24 (24 by maintainers)
@joaomoreno After trying to implement settings storage using
ExtensionContext.storagePathI came upon the following cases:storagePathis undefined when a workspace is not loadedstoragePathis different for every workspace loadedTherefore using
ExtensionContext.storagePathto store extension settings is not a viable solution, as a constant path is required.The offer for the statue still stands.
I see it now. Guilty as charged. Just for the record, I’ve seen other extensions storing files where they shouldn’t too. We are going to adjust our code to use the API instead. And let’s hope we will get the API for the uninstall script real soon.
Having access to
vscodeAPI is a plus, and would help in cleaning up thesettings.jsonproperly. But what about the scenario that we want to delete a file that was put in theUserdirectory by the extension? And that proposal surely doesn’t justify a statue. 😄