refactor: dedupe cli config cron and install flows
This commit is contained in:
10
src/cli/install-spec.ts
Normal file
10
src/cli/install-spec.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
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))
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user