refactor: simplify execAsync options type for better clarity

- Updated the options parameter in execAsync to a more streamlined type, focusing on cwd, env, and shell properties for improved clarity and usability.
This commit is contained in:
Mauricio Siu
2025-11-26 00:50:51 -05:00
parent dbe1733dcb
commit 8aff1e7614

View File

@@ -1,5 +1,4 @@
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";
@@ -12,7 +11,7 @@ const execAsyncBase = util.promisify(exec);
export const execAsync = async (
command: string,
options?: ObjectEncodingOptions & ExecOptions,
options?: { cwd?: string; env?: NodeJS.ProcessEnv; shell?: string },
): Promise<{ stdout: string; stderr: string }> => {
try {
const result = await execAsyncBase(command, options);