Skip to content

Commit

Permalink
Set environment variable in subprocess call on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
NSBum committed Jul 5, 2022
1 parent c951dcb commit 95545d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/editExternal.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def open_in_external(fileabspath, external_program, shell=True):
env = env_adjust()
if isMac:
cmd = f"open -a {external_program} '{fileabspath}'"
subprocess.run(shlex.split(cmd), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
subprocess.run(shlex.split(cmd), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, env=env)
else:
# in 2019-12 I have no idea why I used shell=True by default in 2019-05.
if shell:
Expand Down

0 comments on commit 95545d7

Please sign in to comment.