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')