export function resolveConfigPathFromArgs(args, env) {
    const flagIndex = args.indexOf("--config");
    if (flagIndex !== -1) {
        const value = args[flagIndex + 1];
        return value === undefined || value.startsWith("--")
            ? { kind: "missing-value" }
            : { kind: "path", path: value };
    }
    return env.KEIKO_CONFIG_FILE === undefined
        ? { kind: "not-configured" }
        : { kind: "path", path: env.KEIKO_CONFIG_FILE };
}
