core/resolvers/shell.resolver.ts

core/resolvers/shell.resolver.ts is a file in Code Parse. 12 lines of code and 1 definition.

import { WINDOWS, WINDOWS_SHELL, WINDOWS_SHELL_FLAGS } from "#configuration/constants/shell.constants";
import type { Invocation } from "#types/shell.types";

export const invocationFor = function invocationFor(
    platform: string,
    name: string,
    args: readonly string[],
): Invocation {
    if (platform !== WINDOWS) {
        return { args, file: name };
    }
    return { args: [...WINDOWS_SHELL_FLAGS, name, ...args], file: WINDOWS_SHELL };
};