Skip to content

Commit 414ec3d

Browse files
committed
refacto: "runas_host_user" required a POSIX system to work
1 parent c660095 commit 414ec3d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

airbyte/_executors/util.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import os
55
import tempfile
6+
import logging
67
from pathlib import Path
78
from typing import TYPE_CHECKING, Literal, cast
89

@@ -21,6 +22,7 @@
2122
from airbyte.sources.registry import ConnectorMetadata, InstallType, get_connector_metadata
2223
from airbyte.version import get_version
2324

25+
logger = logging.getLogger("airbyte")
2426

2527
if TYPE_CHECKING:
2628
from airbyte._executors.base import Executor
@@ -239,7 +241,10 @@ def get_connector_executor( # noqa: PLR0912, PLR0913, PLR0915 # Too many branch
239241
docker_cmd.extend(["--network", "host"])
240242

241243
if runas_host_user is True:
242-
docker_cmd.extend(["--user", f"{os.getuid()}:{os.getgid()}"])
244+
try:
245+
docker_cmd.extend(["--user", f"{os.getuid()}:{os.getgid()}"])
246+
except:
247+
logger.info("The 'runas_host_user' parameter is only supported on POSIX systems.")
243248

244249
docker_cmd.extend([docker_image])
245250

0 commit comments

Comments
 (0)