Skip to content

Commit eacc4c3

Browse files
Revathyvenugopal162pre-commit-ci[bot]pyansys-ci-bot
authored
fix: check the working directory path before run subprocess (#831)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 57e71f4 commit eacc4c3

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

doc/changelog/831.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
check the working directory path before run subprocess

src/ansys/dyna/core/run/windows_runner.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ def _get_command_line(self) -> str:
164164
ncpu = self.ncpu
165165
mem = self.get_memory_string()
166166
input_file = self.input_file
167+
168+
if not os.path.isabs(self.working_directory):
169+
self.working_directory = os.path.abspath(self.working_directory)
170+
167171
if self.mpi_option == MpiOption.SMP:
168172
command = f"{self.solver} i={input_file} ncpu={ncpu} memory={mem}"
169173
elif self.mpi_option == MpiOption.MPP_INTEL_MPI:

0 commit comments

Comments
 (0)