shinclaw / src /cli /command-options.ts
HF Bot
chore: snapshot for Hugging Face Space
c91968c
Raw
History Blame Contribute Delete
294 Bytes
import type { Command } from "commander";
export function hasExplicitOptions(command: Command, names: readonly string[]): boolean {
if (typeof command.getOptionValueSource !== "function") {
return false;
}
return names.some((name) => command.getOptionValueSource(name) === "cli");
}