Skip to content
This repository was archived by the owner on Dec 6, 2025. It is now read-only.

Commit 2a56587

Browse files
committed
fix: escape quotes in description
1 parent 75464b8 commit 2a56587

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

modules/json/options.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ editOptions() {
5252
empty
5353
end' <<< "$OPTIONS_JSON"
5454
)
55-
5655
source <(jq -nrc --arg PKG_NAME "$PKG_NAME" --arg SELECTED_OPTION "$SELECTED_OPTION" --arg CURRENT_VALUE "${CURRENT_VALUE[0]}" --argjson AVAILABLE_PATCHES "$AVAILABLE_PATCHES" '
5756
$AVAILABLE_PATCHES[] |
5857
select(.pkgName == $PKG_NAME or .pkgName == null) |
@@ -65,7 +64,7 @@ editOptions() {
6564
.key == $KEY and .patchName == $PATCH_NAME
6665
) |
6766
"TYPE=\(.type)",
68-
"DESCRIPTION=\"\(.description | gsub("\n"; "\\n"))\"",
67+
"DESCRIPTION=\"\(.description | gsub("\n"; "\\n") | gsub("\""; "\\\""))\"",
6968
"VALUES=(
7069
\(
7170
[

0 commit comments

Comments
 (0)