
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="024855a8-f1cc-51d8-9b27-44facb8bfb3d")}catch(e){}}();
export function resolveInteractiveShellCommand() {
    if (process.platform === "win32") {
        const command = process.env.COMSPEC?.trim();
        if (command) {
            return {
                binary: command,
                args: [],
            };
        }
        return {
            binary: "powershell.exe",
            args: ["-NoLogo"],
        };
    }
    const command = process.env.SHELL?.trim();
    if (command) {
        return {
            binary: command,
            args: ["-i"],
        };
    }
    return {
        binary: "bash",
        args: ["-i"],
    };
}
export function quoteShellArg(value) {
    if (process.platform === "win32") {
        return `"${value.replaceAll('"', '""')}"`;
    }
    return `'${value.replaceAll("'", "'\\''")}'`;
}
export function buildShellCommandLine(binary, args) {
    return [binary, ...args].map((part) => quoteShellArg(part)).join(" ");
}
//# sourceMappingURL=shell.js.map
//# debugId=024855a8-f1cc-51d8-9b27-44facb8bfb3d
