fix sequential awaits

This commit is contained in:
rpoetrap
2026-04-07 17:04:38 +07:00
parent 3e11897762
commit e802342f57
+5 -1
View File
@@ -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(