This repository was archived by the owner on May 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,21 @@ function run_code_server() {
23
23
if [ ! -f ~ /.local/share/code-server/User/settings.json ]; then
24
24
echo " ⚙️ Creating settings file..."
25
25
mkdir -p ~ /.local/share/code-server/User
26
- echo " ${SETTINGS} " > ~ /.local/share/code-server/User/settings.json
26
+ if command -v jq & > /dev/null; then
27
+ echo " ${SETTINGS} " | jq ' .' > ~ /.local/share/code-server/User/settings.json
28
+ else
29
+ echo " ${SETTINGS} " > ~ /.local/share/code-server/User/settings.json
30
+ fi
27
31
fi
28
32
29
33
# Apply/overwrite template based settings
30
34
echo " ⚙️ Creating machine settings file..."
31
35
mkdir -p ~ /.local/share/code-server/Machine
32
- echo " ${MACHINE_SETTINGS} " > ~ /.local/share/code-server/Machine/settings.json
36
+ if command -v jq & > /dev/null; then
37
+ echo " ${MACHINE_SETTINGS} " | jq ' .' > ~ /.local/share/code-server/Machine/settings.json
38
+ else
39
+ echo " ${MACHINE_SETTINGS} " > ~ /.local/share/code-server/Machine/settings.json
40
+ fi
33
41
34
42
# Check if code-server is already installed for offline
35
43
if [ " ${OFFLINE} " = true ]; then
You can’t perform that action at this time.
0 commit comments