Skip to content

Commit c481086

Browse files
committed
added support for cmd specific env vars and auth
1 parent 47f4a9d commit c481086

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pystackql/stackql.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,13 @@ def _run_query(self, query, custom_auth=None, env_vars=None):
224224
local_params.pop(auth_index) # remove the auth string
225225
authstr = json.dumps(custom_auth)
226226

227-
# For Windows PowerShell, transpose quotes: wrap with " and use ' inside the JSON
228-
if self.platform.startswith("Windows"):
229-
authstr = authstr.replace('"', "'") # Replace inner double quotes with single quotes
230-
authstr = f'"{authstr}"' # Wrap the entire string in double quotes
231-
else:
232-
authstr = f"'{authstr}'" # Use single quotes on non-Windows platforms
233-
227+
# For Windows PowerShell, transpose quotes: wrap with " and use ' inside the JSON
228+
if self.platform.startswith("Windows"):
229+
authstr = authstr.replace('"', "'") # Replace inner double quotes with single quotes
230+
authstr = f'"{authstr}"' # Wrap the entire string in double quotes
231+
else:
232+
authstr = f"'{authstr}'" # Use single quotes on non-Windows platforms
233+
234234
local_params.extend(["--auth", authstr])
235235

236236
output = {}

0 commit comments

Comments
 (0)