mirror of
https://github.com/andwati/dokploy.git
synced 2026-10-18 03:02:56 +00:00
fix sequential awaits
This commit is contained in:
@@ -24,7 +24,11 @@ export const isDockerDesktop = async () => {
|
||||
/** Returns the Docker host IP address. */
|
||||
export const getDockerHost = async (): Promise<string> => {
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
if (process.platform === "linux" && !(await isWSL() || await isDockerDesktop())) {
|
||||
const isLinux = process.platform === "linux"
|
||||
? (await Promise.all([isWSL(), isDockerDesktop()])).every((v) => !v)
|
||||
: false;
|
||||
|
||||
if (isLinux) {
|
||||
try {
|
||||
// Try to get the Docker bridge IP first
|
||||
const { stdout } = await execAsync(
|
||||
|
||||
Reference in New Issue
Block a user