mirror of
https://github.com/bwya77/vscode-dark-islands.git
synced 2026-05-09 08:25:35 +02:00
[GH-ISSUE #113] install.ps1 deletes extensions.json and uninstall.ps1 corrupts it, destroying all extensions #81
Labels
No labels
bug
bug
duplicate
enhancement
enhancement
Missing Info
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vscode-dark-islands#81
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @khuynh22 on GitHub (Mar 4, 2026).
Original GitHub issue: https://github.com/bwya77/vscode-dark-islands/issues/113
Description
After installing via
install.ps1and then uninstalling viauninstall.ps1on Windows, all VS Code extensions are removed and no extensions can be installed or loaded. VS Code reports:Root Cause
There are two bugs — one in each script:
Bug 1:
install.ps1deletesextensions.jsonhttps://github.com/bwya77/vscode-dark-islands/blob/main/install.ps1#L49-L53
This deletes the extension registry outright. The comment says "previous versions of this script wrote invalid content to this file" — so the fix for the old bug was to just nuke the file. When VS Code rebuilds it, it only registers extensions it can discover on disk at startup, which may not include all previously installed extensions (e.g., extensions installed via marketplace that rely on proper metadata in this file).
Bug 2:
uninstall.ps1corruptsextensions.jsonvia PowerShell serializationhttps://github.com/bwya77/vscode-dark-islands/blob/main/uninstall.ps1#L37-L45
When only one extension remains after filtering out
bwya77.islands-dark, PowerShell'sConvertTo-Jsonserializes it as a bare JSON object{...}instead of a JSON array[{...}]. This is a well-known PowerShell 5.1 gotcha — the@()array wrapper does not surviveConvertTo-Jsonfor single-element arrays. VS Code expectsextensions.jsonto be a JSON array and cannot parse the bare object, breaking the entire extension system.Steps to Reproduce
install.ps1(this deletesextensions.json)uninstall.ps1— if only one extension remains registered,extensions.jsonis corruptedImpact
extensions.jsonis corrupted so VS Code's extension system is completely brokenSuggested Fix
For
install.ps1: Don't deleteextensions.json. Instead, only remove the specific islands-dark entry (same approach as uninstall, but with the array fix below).For
uninstall.ps1: Force JSON array output regardless of element count:Environment
Related Issues
@oldjs commented on GitHub (Mar 9, 2026):
Unbelievable, this piece of junk made by your motherf develope just look at macOS users
@oldjs commented on GitHub (Mar 9, 2026):
I recommend using https://vsllm.com to recover.
@YvonneSherwood5 commented on GitHub (Mar 10, 2026):
/Users/dingliangyi/Library/Application Support/Code/User/sync/extensions
See if it's possible to restore some plugins in this sync history
I have never seen such a shitty project.
I want to help some unfortunate people.
@hczs commented on GitHub (Mar 12, 2026):
Fuck!!!!!!!!!!
@khuynh22 commented on GitHub (Mar 12, 2026):
Yeah the author wasn't even care about our comments