mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:40:44 +00:00
refactor: dedupe tooling helpers
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { spawnSync } from "node:child_process";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { readFlagValue } from "./lib/arg-utils.mjs";
|
||||
import {
|
||||
acquireLocalHeavyCheckLockSync,
|
||||
applyLocalTsgoPolicy,
|
||||
@@ -45,16 +46,3 @@ try {
|
||||
} finally {
|
||||
releaseLock();
|
||||
}
|
||||
|
||||
function readFlagValue(args, name) {
|
||||
for (let index = 0; index < args.length; index++) {
|
||||
const arg = args[index];
|
||||
if (arg === name) {
|
||||
return args[index + 1];
|
||||
}
|
||||
if (arg.startsWith(`${name}=`)) {
|
||||
return arg.slice(name.length + 1);
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user