mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 15:30:39 +00:00
11 lines
293 B
TypeScript
11 lines
293 B
TypeScript
import path from "node:path";
|
|
|
|
export function looksLikeLocalInstallSpec(spec: string, knownSuffixes: readonly string[]): boolean {
|
|
return (
|
|
spec.startsWith(".") ||
|
|
spec.startsWith("~") ||
|
|
path.isAbsolute(spec) ||
|
|
knownSuffixes.some((suffix) => spec.endsWith(suffix))
|
|
);
|
|
}
|