Skip to content

Commit aa12b9e

Browse files
committed
added support for cmd specific env vars and auth
1 parent 9c650e9 commit aa12b9e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pystackql/stackql.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,10 @@ def _run_query(self, query, custom_auth=None, env_vars=None):
223223
if env_vars:
224224
if self.platform.startswith("Windows"):
225225
# For Windows, use PowerShell syntax
226-
env_command_prefix = "& { " + " ".join([f'$env:{key} = "{value}";' for key, value in env_vars.items()]) + " "
227-
full_command = f"{env_command_prefix}{self.bin_path} " + " ".join(local_params) + " }"
226+
# env_command_prefix = "& { " + " ".join([f'$env:{key} = "{value}";' for key, value in env_vars.items()]) + " "
227+
# full_command = f"{env_command_prefix}{self.bin_path} " + " ".join(local_params) + " }"
228+
env_command_prefix = " ".join([f'$env:{key}="{value}";' for key, value in env_vars.items()])
229+
full_command = f"{env_command_prefix} {self.bin_path} " + " ".join(local_params)
228230
else:
229231
# For Linux/Mac, use standard env variable syntax
230232
env_command_prefix = "env " + " ".join([f'{key}="{value}"' for key, value in env_vars.items()]) + " "

0 commit comments

Comments
 (0)