You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by zh...@apache.org on 2026/10/21 11:06:14 UTC

(maka) branch main updated: test(desktop): publish Chrome fixture output atomically (#6223)

This is an automated email from the ASF dual-hosted git repository.

me2seeks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/maka.git


The following commit(s) were added to refs/heads/main by this push:
     new 0d19f24233 test(desktop): publish Chrome fixture output atomically (#6223)
0d19f24233 is described below

commit 0d19f242336a31e8aeb300372d3d3c896b1e99ef
Author: Zhang <96...@users.noreply.github.com>
AuthorDate: Wed Oct 21 19:06:06 2026 +0800

    test(desktop): publish Chrome fixture output atomically (#6223)
---
 apps/desktop/src/main/__tests__/opencli-chrome.test.ts | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/apps/desktop/src/main/__tests__/opencli-chrome.test.ts b/apps/desktop/src/main/__tests__/opencli-chrome.test.ts
index f81ca22a14..8db5a47843 100644
--- a/apps/desktop/src/main/__tests__/opencli-chrome.test.ts
+++ b/apps/desktop/src/main/__tests__/opencli-chrome.test.ts
@@ -154,7 +154,10 @@ test('Windows opens the store page in installed Chrome, not the default browser'
   const chrome = join(local, 'Google', 'Chrome', 'Application', 'chrome.exe');
   const received = join(local, 'received-url');
   mkdirSync(dirname(chrome), { recursive: true });
-  writeFileSync(chrome, `#!/bin/sh\nprintf '%s' "$1" > '${received}'\n`, { mode: 0o755 });
+  // The test polls for `received`, so the URL must be published atomically:
+  // a redirect would create the file before printf writes it and the poll
+  // could observe an empty file.
+  writeFileSync(chrome, `#!/bin/sh\nprintf '%s' "$1" > '${received}.tmp'\nmv '${received}.tmp' '${received}'\n`, { mode: 0o755 });
   const url = 'https://chromewebstore.google.com/detail/opencli';
   const defaultBrowser: string[] = [];
   const openExternal = async (target: string) => {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org