Skip to content

Commit 79d3001

Browse files
committed
fix: preserve line endings and robust mount parsing
1 parent 41eec7f commit 79d3001

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

scripts/ci/cleanup-dmg.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ terminate_pid_soft_then_hard() {
263263

264264
cleanup_stale_dmg_state() {
265265
local dmg_mounts
266-
dmg_mounts="$(mount | awk -v mount_regex="${rw_dmg_mountpoint_regex}" '
267-
$1 ~ /^\/dev\/disk/ && $3 ~ mount_regex { print $3 }
266+
dmg_mounts="$(mount | awk -F ' on | \\(' -v mount_regex="${rw_dmg_mountpoint_regex}" '
267+
$1 ~ /^\/dev\/disk/ && $2 ~ mount_regex { print $2 }
268268
' || true)"
269269
if [ -n "${dmg_mounts}" ]; then
270270
while IFS= read -r mount_point; do

scripts/prepare-resources.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ const patchMonacoCssNestingWarnings = async (dashboardDir) => {
212212
const LEGACY_DESKTOP_BRIDGE_PATTERNS = {
213213
trayRestartGuard:
214214
/if\s*\(\s*!desktopBridge\?\.isElectron\s*\|\|\s*!desktopBridge\.onTrayRestartBackend\s*\)\s*\{/,
215-
typeIsElectron: /^\s+isElectron:\s*boolean;\r?\n/m,
216-
typeIsElectronRuntime: /^\s+isElectronRuntime:\s*\(\)\s*=>\s*Promise<boolean>;\r?\n/m,
215+
typeIsElectron: /^(\s+)isElectron:\s*boolean;(\r?\n)/m,
216+
typeIsElectronRuntime: /^(\s+)isElectronRuntime:\s*\(\)\s*=>\s*Promise<boolean>;(\r?\n)/m,
217217
electronAppFlagToken: /\bisElectronApp\b/,
218218
electronAppFlagReplace: /\bisElectronApp\b/g,
219219
desktopReleaseEnvGuard:
@@ -297,11 +297,11 @@ const patchLegacyDesktopBridgeArtifacts = async (dashboardDir) => {
297297
let patched = source;
298298
patched = patched.replace(
299299
LEGACY_DESKTOP_BRIDGE_PATTERNS.typeIsElectron,
300-
' isDesktop: boolean;\n',
300+
'$1isDesktop: boolean;$2',
301301
);
302302
patched = patched.replace(
303303
LEGACY_DESKTOP_BRIDGE_PATTERNS.typeIsElectronRuntime,
304-
' isDesktopRuntime: () => Promise<boolean>;\n',
304+
'$1isDesktopRuntime: () => Promise<boolean>;$2',
305305
);
306306
return patched;
307307
},

0 commit comments

Comments
 (0)