feat(gateway): improve Gateway process management & logging (#26)
This commit is contained in:
committed by
GitHub
Unverified
parent
3379229914
commit
a27f3b4113
@@ -98,9 +98,7 @@ export function getOpenClawEntryPath(): string {
|
||||
export function isOpenClawPresent(): boolean {
|
||||
const dir = getOpenClawDir();
|
||||
const pkgJsonPath = join(dir, 'package.json');
|
||||
const exists = existsSync(dir) && existsSync(pkgJsonPath);
|
||||
logger.debug(`isOpenClawPresent: dir=${dir}, exists=${exists}`);
|
||||
return exists;
|
||||
return existsSync(dir) && existsSync(pkgJsonPath);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -109,12 +107,8 @@ export function isOpenClawPresent(): boolean {
|
||||
*/
|
||||
export function isOpenClawBuilt(): boolean {
|
||||
const dir = getOpenClawDir();
|
||||
// Check for dist/entry.js or just the dist directory with JS files
|
||||
const entryPath = join(dir, 'dist', 'entry.js');
|
||||
const distDir = join(dir, 'dist');
|
||||
const hasEntry = existsSync(entryPath);
|
||||
const hasDist = existsSync(distDir);
|
||||
logger.debug(`isOpenClawBuilt: distDir=${distDir}, hasDist=${hasDist}, hasEntry=${hasEntry}`);
|
||||
return hasDist;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user