Open yangm97 opened 1 year ago
Yeah. The same is happening with this extension: https://open-vsx.org/extension/golf1052/base16-generator, I have used it to auto select various themes using base16 colors, but It is throwing errors, only If I install it this way. Otherwise if I install from extensions tab inside vscode, it works.
Same for the catppuccin theme.
Changing accent color causes Error: EROFS: read-only file system, open '/home/<user>/.vscode-oss/extensions/catppuccin.catppuccin-vsc/themes/mocha.json'
.
I'm installing it in the "normal" way from vscode as a workaround for now.
NVM just had to RTFM
I recently came across this Reddit post. The post and comments mention Nix-Bwrapper and NixPak for sandboxing packages. Maybe we can wrap extensions that want to write to the extensions directory, and bind another writable directory in their write location.
@AmeerTaweel, have you tried to implement your solution? If yes, what were the outcomes?
Sorry for the late reply @deemp.
I tried using both Nix-Bwrapper and NixPak to sandbox VSCode extensions, but I was unsuccessful.
I could not reproduce @yangm97's issue with visualstudioexptteam.vscodeintellicode
.
I was able to reproduce @mobsenpai's issue with golf1052.base16-generator
. However, both Nix-Bwrapper and NixPak are designed to sandbox binaries. And the extension only contains JS files, so I was out of luck...
However, I still believe this approach might work with VSCode extensions that contain binaries.
Noticed this at the console:
I suppose this extension in particular isn't following the best practices and stuff, but I wonder what would be a fix that doesn't depend on upstream.