refactor: update execAsync options type for improved flexibility

- Enhanced the options parameter in execAsync to accept ObjectEncodingOptions and ExecOptions, allowing for more versatile command execution configurations.
This commit is contained in:
Mauricio Siu
2025-11-26 00:20:39 -05:00
parent 73d87c06e1
commit dbe1733dcb

View File

@@ -1,4 +1,5 @@
import { exec, execFile } from "node:child_process";
import type { ObjectEncodingOptions } from "node:fs";
import util from "node:util";
import { findServerById } from "@dokploy/server/services/server";
import { Client } from "ssh2";
@@ -11,7 +12,7 @@ const execAsyncBase = util.promisify(exec);
export const execAsync = async (
command: string,
options?: { cwd?: string; env?: NodeJS.ProcessEnv },
options?: ObjectEncodingOptions & ExecOptions,
): Promise<{ stdout: string; stderr: string }> => {
try {
const result = await execAsyncBase(command, options);