openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 1.24 kB
JavaScript
import{createRequire}from"node:module";
//!src/infra/windows-appcontainer-spawn.ts
var AppContainerSpawnUnsupportedError=class extends Error{constructor(e){super(`AppContainer: libuv ${e} cannot create child pipes; 1.53.0+ required. Run OpenClaw outside the AppContainer or use a Node build with libuv >= 1.53.0.`);this.code=`APPCONTAINER_SPAWN_UNSUPPORTED`;this.name=`AppContainerSpawnUnsupportedError`}};let checked=false;let unsupported;function assertAppContainerSpawnSupported(e){if(process.platform!==`win32`)return;if(e===`ignore`||e===`inherit`||Array.isArray(e)&&e.length>=3&&e.every(e=>e!==void 0&&e!==null&&e!==`pipe`&&e!==`overlapped`&&e!==`ipc`&&!(typeof e===`number`&&e<0)))return;if(!checked){checked=true;try{const{readCurrentAppContainerSid:e}=createRequire(import.meta.url)(`@openclaw/proc-safe/windows-token`);const t=e();const n=process.versions.uv;const r=Number(n.split(`.`)[0]);const i=Number(n.split(`.`)[1]);if(t!==null&&(r<1||r===1&&i<53))unsupported=new AppContainerSpawnUnsupportedError(n)}catch(e){import(`./windows-appcontainer-spawn-log.runtime-7pEAOs6s.js`).then(({logAppContainerTokenProbeFailure:t})=>t(e)).catch(()=>{})}}if(unsupported)throw unsupported}export{assertAppContainerSpawnSupported as t};