合并 codex/ai-game-creator-app Windows 启动失败修复
Project CI / Repository checks (pull_request) Failing after 1m16s
Project CI / Frontend tests (pull_request) Successful in 2m31s
Project CI / Backend tests (pull_request) Successful in 4m46s
Project CI / Native shell tests (pull_request) Successful in 10m26s

This commit is contained in:
2026-07-27 09:53:28 +00:00
3 changed files with 11 additions and 5 deletions
@@ -31,8 +31,8 @@ const npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const windowsPrivateAclScript = String.raw`
$ErrorActionPreference = 'Stop'
$target = [System.IO.Path]::GetFullPath($args[0])
$isDirectory = [System.Boolean]::Parse($args[1])
$target = [System.IO.Path]::GetFullPath($env:GENARRATIVE_AGC_PRIVATE_PATH)
$isDirectory = [System.Boolean]::Parse($env:GENARRATIVE_AGC_PRIVATE_IS_DIRECTORY)
$currentSid = [System.Security.Principal.WindowsIdentity]::GetCurrent().User
$inheritance = [System.Security.AccessControl.InheritanceFlags]::None
if ($isDirectory) {
@@ -297,9 +297,13 @@ export async function secureWindowsGameCreatorPathForCurrentUser(
'Bypass',
'-Command',
windowsPrivateAclScript,
targetPath,
String(isDirectory),
]);
], {
env: {
...process.env,
GENARRATIVE_AGC_PRIVATE_PATH: targetPath,
GENARRATIVE_AGC_PRIVATE_IS_DIRECTORY: String(isDirectory),
},
});
if (result.code !== 0 || result.signal) {
const detail = result.stderr.trim() || result.stdout.trim();
throw new Error(