mirror of
https://github.com/bwya77/vscode-dark-islands.git
synced 2026-05-09 08:25:35 +02:00
[PR #8] [MERGED] Fix JSON parsing error and interactive prompt hang in install.sh #95
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#95
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?
📋 Pull Request Information
Original PR: https://github.com/bwya77/vscode-dark-islands/pull/8
Author: @mayur1377
Created: 2/15/2026
Status: ✅ Merged
Merged: 2/15/2026
Merged by: @bwya77
Base:
main← Head:fix-json-parsing-error📝 Commits (1)
073c898Fix JSON parsing error and interactive prompt hang in install.sh📊 Changes
1 file changed (+7 additions, -4 deletions)
View changed files
📝
install.sh(+7 -4)📄 Description
Issue
The installer was failing with a JSON parsing error:
This occurred when the existing VS Code settings.json contained double slashes (//) inside string values, which the stripJsonc() function incorrectly treated as comments and removed, corrupting the JSON structure.
Additionally, the script would hang indefinitely when run in non-interactive environments due to the
read -pprompt.Root Cause
/\/\/.*$/gmwas removing//from inside JSON strings, not just commentsread -pblocked execution in non-interactive shellsFix
/\/\/(?=(?:[^"\\]|\\.)*$)/gmto only remove//that are actual comments (not inside strings)if [ -t 0 ]before interactive prompt to prevent hanging🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.