File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change
1
+ from __future__ import annotations
2
+
1
3
from .launcher import launch
2
4
3
5
Original file line number Diff line number Diff line change @@ -133,16 +133,18 @@ def launch(
133
133
134
134
# launch command
135
135
136
- env_export_string = ""
137
136
env_exports = []
138
137
for k , v in os .environ .items ():
139
- for e in env_vars :
140
- if any (fnmatch .fnmatch (k , e )):
141
- env_exports .append (f"{ k } ={ v } " )
138
+ if any (fnmatch .fnmatch (k , e ) for e in env_vars ):
139
+ env_exports .append (f"{ k } ={ v } " )
140
+
141
+ env_export_string = ""
142
142
if len (env_exports ) > 0 :
143
143
env_export_string = f"export { ' ' .join (env_exports )} && "
144
144
145
- env_file_string = f"source { env_file } && " if env_file is not None else ""
145
+ env_file_string = ""
146
+ if env_file is not None :
147
+ env_file_string = f"source { env_file } && "
146
148
147
149
launcher_hostname = socket .getfqdn ()
148
150
launcher_port = get_open_port ()
You can’t perform that action at this time.
0 commit comments