mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-29 06:48:45 +00:00
fix sequential awaits
This commit is contained in:
@@ -24,7 +24,11 @@ export const isDockerDesktop = async () => {
|
|||||||
/** Returns the Docker host IP address. */
|
/** Returns the Docker host IP address. */
|
||||||
export const getDockerHost = async (): Promise<string> => {
|
export const getDockerHost = async (): Promise<string> => {
|
||||||
if (process.env.NODE_ENV === "production") {
|
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 {
|
||||||
// Try to get the Docker bridge IP first
|
// Try to get the Docker bridge IP first
|
||||||
const { stdout } = await execAsync(
|
const { stdout } = await execAsync(
|
||||||
|
|||||||
Reference in New Issue
Block a user