openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 1.09 kB
JavaScript
import{d as isRootVersionInvocation}from"./argv-BgC5-KlV.mjs";import{c as formatErrorStackWithMessage}from"./error-coercion-DlKnt6w-.mjs";import{r as resolveCliContainerTarget}from"./container-target-Bu0XIXVW.mjs";
//!src/entry.version-fast-path.ts
function tryHandleRootVersionFastPath(e){if(resolveCliContainerTarget(e))return false;if(!isRootVersionInvocation(e))return false;const onError=async e=>{const t=`[openclaw] Failed to resolve version: ${e instanceof Error?formatErrorStackWithMessage(e):String(e)}\n`;try{const[{loadCliDotEnv:e},{formatConsoleDiagnosticBlock:n}]=await Promise.all([import(`./dotenv-CR1t6RkD.mjs`),import(`./json-console-line-8u1wxtwQ.mjs`)]);e();process.stderr.write(n({message:t}))}catch{process.stderr.write(t)}finally{process.exitCode=1}};Promise.all([import(`./version-Durg_CtO.mjs`),import(`./git-commit-tTc0HZYm.mjs`)]).then(([{VERSION:e},{resolveCommitHash:t}])=>{const n=t({moduleUrl:import.meta.url});console.log(n?`OpenClaw ${e} (${n})`:`OpenClaw ${e}`);process.exitCode=0}).catch(onError);return true}export{tryHandleRootVersionFastPath as t};