mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-16 04:35:24 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user