Skip to content

Commit df79c7d

Browse files
fix: escape terraform cowork wrapper script
1 parent ac5996b commit df79c7d

5 files changed

Lines changed: 20 additions & 20 deletions

File tree

workspaces/AdvancedHostDANGER/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ PULSECFG
205205
done
206206
mkdir -p "$HOME/.config/environment.d"
207207
cat > "$HOME/.config/environment.d/claude-cowork.conf" <<EOF
208-
${COWORK_TAG}
208+
$${COWORK_TAG}
209209
COWORK_VM_BACKEND=host
210210
EOF
211211
CLAUDE_WRAP_TAG="# managed-by-danger-template: claude-desktop-wrapper"
@@ -215,9 +215,9 @@ EOF
215215
fi
216216
sudo tee /usr/bin/claude-desktop >/dev/null <<EOF
217217
#!/bin/sh
218-
${CLAUDE_WRAP_TAG}
219-
exec env ELECTRON_DISABLE_SANDBOX=1 ELECTRON_OZONE_PLATFORM_HINT="\${ELECTRON_OZONE_PLATFORM_HINT:-auto}" COWORK_VM_BACKEND="\${COWORK_VM_BACKEND:-host}" \
220-
/usr/bin/claude-desktop.real "\$@"
218+
$${CLAUDE_WRAP_TAG}
219+
exec env ELECTRON_DISABLE_SANDBOX=1 ELECTRON_OZONE_PLATFORM_HINT="$${ELECTRON_OZONE_PLATFORM_HINT:-auto}" COWORK_VM_BACKEND="$${COWORK_VM_BACKEND:-host}" \
220+
/usr/bin/claude-desktop.real "$$@"
221221
EOF
222222
sudo chmod 0755 /usr/bin/claude-desktop
223223
fi

workspaces/Developer/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ PULSECFG
248248
done
249249
mkdir -p "$HOME/.config/environment.d"
250250
cat > "$HOME/.config/environment.d/claude-cowork.conf" <<EOF
251-
${COWORK_TAG}
251+
$${COWORK_TAG}
252252
COWORK_VM_BACKEND=host
253253
EOF
254254
CLAUDE_WRAP_TAG="# managed-by-developer-template: claude-desktop-wrapper"
@@ -258,9 +258,9 @@ EOF
258258
fi
259259
sudo tee /usr/bin/claude-desktop >/dev/null <<EOF
260260
#!/bin/sh
261-
${CLAUDE_WRAP_TAG}
262-
exec env ELECTRON_DISABLE_SANDBOX=1 ELECTRON_OZONE_PLATFORM_HINT="\${ELECTRON_OZONE_PLATFORM_HINT:-auto}" COWORK_VM_BACKEND="\${COWORK_VM_BACKEND:-host}" \
263-
/usr/bin/claude-desktop.real "\$@"
261+
$${CLAUDE_WRAP_TAG}
262+
exec env ELECTRON_DISABLE_SANDBOX=1 ELECTRON_OZONE_PLATFORM_HINT="$${ELECTRON_OZONE_PLATFORM_HINT:-auto}" COWORK_VM_BACKEND="$${COWORK_VM_BACKEND:-host}" \
263+
/usr/bin/claude-desktop.real "$$@"
264264
EOF
265265
sudo chmod 0755 /usr/bin/claude-desktop
266266
fi

workspaces/DeveloperAndroid/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ PULSECFG
223223
done
224224
mkdir -p "$HOME/.config/environment.d"
225225
cat > "$HOME/.config/environment.d/claude-cowork.conf" <<EOF
226-
${COWORK_TAG}
226+
$${COWORK_TAG}
227227
COWORK_VM_BACKEND=host
228228
EOF
229229
CLAUDE_WRAP_TAG="# managed-by-android-template: claude-desktop-wrapper"
@@ -233,9 +233,9 @@ EOF
233233
fi
234234
sudo tee /usr/bin/claude-desktop >/dev/null <<EOF
235235
#!/bin/sh
236-
${CLAUDE_WRAP_TAG}
237-
exec env ELECTRON_DISABLE_SANDBOX=1 ELECTRON_OZONE_PLATFORM_HINT="\${ELECTRON_OZONE_PLATFORM_HINT:-auto}" COWORK_VM_BACKEND="\${COWORK_VM_BACKEND:-host}" \
238-
/usr/bin/claude-desktop.real "\$@"
236+
$${CLAUDE_WRAP_TAG}
237+
exec env ELECTRON_DISABLE_SANDBOX=1 ELECTRON_OZONE_PLATFORM_HINT="$${ELECTRON_OZONE_PLATFORM_HINT:-auto}" COWORK_VM_BACKEND="$${COWORK_VM_BACKEND:-host}" \
238+
/usr/bin/claude-desktop.real "$$@"
239239
EOF
240240
sudo chmod 0755 /usr/bin/claude-desktop
241241
fi

workspaces/Maker/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ PULSECFG
239239
done
240240
mkdir -p "$HOME/.config/environment.d"
241241
cat > "$HOME/.config/environment.d/claude-cowork.conf" <<EOF
242-
${COWORK_TAG}
242+
$${COWORK_TAG}
243243
COWORK_VM_BACKEND=host
244244
EOF
245245
CLAUDE_WRAP_TAG="# managed-by-maker-template: claude-desktop-wrapper"
@@ -249,9 +249,9 @@ EOF
249249
fi
250250
sudo tee /usr/bin/claude-desktop >/dev/null <<EOF
251251
#!/bin/sh
252-
${CLAUDE_WRAP_TAG}
253-
exec env ELECTRON_DISABLE_SANDBOX=1 ELECTRON_OZONE_PLATFORM_HINT="\${ELECTRON_OZONE_PLATFORM_HINT:-auto}" COWORK_VM_BACKEND="\${COWORK_VM_BACKEND:-host}" \
254-
/usr/bin/claude-desktop.real "\$@"
252+
$${CLAUDE_WRAP_TAG}
253+
exec env ELECTRON_DISABLE_SANDBOX=1 ELECTRON_OZONE_PLATFORM_HINT="$${ELECTRON_OZONE_PLATFORM_HINT:-auto}" COWORK_VM_BACKEND="$${COWORK_VM_BACKEND:-host}" \
254+
/usr/bin/claude-desktop.real "$$@"
255255
EOF
256256
sudo chmod 0755 /usr/bin/claude-desktop
257257
fi

workspaces/OpenClaw/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ PULSECFG
180180
done
181181
mkdir -p "$HOME/.config/environment.d"
182182
cat > "$HOME/.config/environment.d/claude-cowork.conf" <<EOF
183-
${COWORK_TAG}
183+
$${COWORK_TAG}
184184
COWORK_VM_BACKEND=host
185185
EOF
186186
CLAUDE_WRAP_TAG="# managed-by-openclaw-template: claude-desktop-wrapper"
@@ -190,9 +190,9 @@ EOF
190190
fi
191191
sudo tee /usr/bin/claude-desktop >/dev/null <<EOF
192192
#!/bin/sh
193-
${CLAUDE_WRAP_TAG}
194-
exec env ELECTRON_DISABLE_SANDBOX=1 ELECTRON_OZONE_PLATFORM_HINT="\${ELECTRON_OZONE_PLATFORM_HINT:-auto}" COWORK_VM_BACKEND="\${COWORK_VM_BACKEND:-host}" \
195-
/usr/bin/claude-desktop.real "\$@"
193+
$${CLAUDE_WRAP_TAG}
194+
exec env ELECTRON_DISABLE_SANDBOX=1 ELECTRON_OZONE_PLATFORM_HINT="$${ELECTRON_OZONE_PLATFORM_HINT:-auto}" COWORK_VM_BACKEND="$${COWORK_VM_BACKEND:-host}" \
195+
/usr/bin/claude-desktop.real "$$@"
196196
EOF
197197
sudo chmod 0755 /usr/bin/claude-desktop
198198
fi

0 commit comments

Comments
 (0)