File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 88import logging
99import os
1010import subprocess
11+ import sys
1112import time
1213import io
1314
@@ -608,7 +609,11 @@ def get_server_type_from_config(
608609 ansys_path = os .environ .get ("AWP_ROOT" + str (__ansys_version__ ), None )
609610 if ansys_path is not None :
610611 sub_folders = os .path .join (ansys_path , _get_path_in_install ())
611- os .environ ["PATH" ] += sub_folders
612+ if not os .name == "posix" :
613+ previous_path = subprocess .check_output (["echo" , "%PATH%" ], shell = True ).decode (sys .stdout .encoding )
614+ else :
615+ previous_path = os .environ ["PATH" ]
616+ os .environ ["PATH" ] = previous_path + sub_folders
612617 return GrpcServer
613618 elif config .protocol == CommunicationProtocols .InProcess and not config .legacy :
614619 return InProcessServer
Original file line number Diff line number Diff line change 11import os
2+ import subprocess
3+ import sys
4+
25import packaging .version
36import pkg_resources
47import importlib
@@ -243,7 +246,8 @@ def load_grpc_client(ansys_path=None):
243246 # on libcrypto and libssl
244247 previous_path = ""
245248 if not ISPOSIX and ANSYS_PATH is not None :
246- previous_path = os .getenv ("PATH" , "" )
249+ # previous_path = os.getenv("PATH", "")
250+ previous_path = subprocess .check_output (["echo" , "%PATH%" ], shell = True ).decode (sys .stdout .encoding )
247251 os .environ ["PATH" ] = path + ";" + previous_path
248252
249253 grpc_client_api_path = os .path .join (path , name )
You can’t perform that action at this time.
0 commit comments