From 182eb33f2fd46e5f89483d9dec90aabc2c3017b7 Mon Sep 17 00:00:00 2001 From: kmahajan Date: Mon, 31 Jul 2023 10:54:12 +0200 Subject: [PATCH 1/2] encapsulated path in quotes for white spaces --- src/ansys/tools/installer/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ansys/tools/installer/main.py b/src/ansys/tools/installer/main.py index 82c7b16c..dbfdc3f5 100644 --- a/src/ansys/tools/installer/main.py +++ b/src/ansys/tools/installer/main.py @@ -230,7 +230,7 @@ def __init__(self, show=True): @protected def _exe_update(self, filename): """After downloading the update for this application, run the file and shutdown this application.""" - run_ps(f"(Start-Process {filename})") + run_ps(f"(Start-Process '{filename}')") # exiting LOG.debug("Closing...") From 8ab84a4696473753681a9f581b7f2560be14a063 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Mon, 31 Jul 2023 11:07:18 +0200 Subject: [PATCH 2/2] fix: additional commands to be quoted --- src/ansys/tools/installer/installer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ansys/tools/installer/installer.py b/src/ansys/tools/installer/installer.py index 50f0a177..34c84fcb 100644 --- a/src/ansys/tools/installer/installer.py +++ b/src/ansys/tools/installer/installer.py @@ -38,5 +38,5 @@ def run_ps(command, full_path_to_ps=False): def install_python(filename, wait=True): """Install "vanilla" python for a single user.""" wait_str = " -Wait" if wait else "" - command = f'(Start-Process {filename} -ArgumentList "/passive InstallAllUsers=0" {wait_str})' + command = f"(Start-Process '{filename}' -ArgumentList '/passive InstallAllUsers=0' {wait_str})" return run_ps(command)