From 72cee3b06e70728e84341f1d9e3a5acf7b2f1c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20David?= Date: Fri, 20 Oct 2023 10:54:06 +0200 Subject: [PATCH] Feature: RQD command expand env vars --- rqd/rqd/rqcore.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rqd/rqd/rqcore.py b/rqd/rqd/rqcore.py index 842028732..a02aa6405 100644 --- a/rqd/rqd/rqcore.py +++ b/rqd/rqd/rqcore.py @@ -124,11 +124,18 @@ def __createEnvVariables(self): def _createCommandFile(self, command): """Creates a file that subprocess. Popen then executes. + + Environment variables are expanded before writing the file. + @type command: string @param command: The command specified in the runFrame request @rtype: string @return: Command file location""" # TODO: this should use tempfile to create the files and clean them up afterwards + + # Expand environment variables + command = os.path.expandvars(command) + try: if platform.system() == "Windows": rqd_tmp_dir = os.path.join(tempfile.gettempdir(), 'rqd')