Skip to content

Commit acb9504

Browse files
RobPasMuepyansys-ci-botpre-commit-ci[bot]
committed
fix: prepare_and_start_backend is only available on Windows (#1076)
Co-authored-by: pyansys-ci-bot <pyansys.github.bot@ansys.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 8f2c63f commit acb9504

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

doc/changelog.d/1076.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix: prepare_and_start_backend is only available on Windows

src/ansys/geometry/core/connection/product_instance.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ def prepare_and_start_backend(
241241
"""
242242
from ansys.geometry.core.modeler import Modeler
243243

244+
if os.name != "nt": # pragma: no cover
245+
raise RuntimeError("Method 'prepare_and_start_backend' is only available on Windows.")
246+
244247
port = _check_port_or_get_one(port)
245248
installations = get_available_ansys_installations()
246249
if product_version != None:
@@ -419,7 +422,6 @@ def _start_program(args: List[str], local_env: Dict[str, str]) -> subprocess.Pop
419422
"""
420423
return subprocess.Popen(
421424
args,
422-
shell=os.name != "nt",
423425
stdin=subprocess.DEVNULL,
424426
stdout=subprocess.DEVNULL,
425427
stderr=subprocess.DEVNULL,

0 commit comments

Comments
 (0)