File tree Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -300,12 +300,13 @@ def setup_idf_environ():
300
300
301
301
py_path = os .path .split (sys .executable )[0 ]
302
302
303
- if 'PATH' in os .environ :
304
- os .environ ['PATH' ] = py_path + os .pathsep + os .environ ['PATH' ]
305
- elif 'path' in os .environ :
306
- os .environ ['path' ] = py_path + os .pathsep + os .environ ['path' ]
303
+ if 'PATH' in env :
304
+ env ['PATH' ] = py_path + os .pathsep + env ['PATH' ]
305
+ elif 'path' in env :
306
+ env ['PATH' ] = py_path + os .pathsep + env ['path' ]
307
+ del env ['path' ]
307
308
else :
308
- os . environ ['PATH' ] = py_path + os .pathsep
309
+ env ['PATH' ] = py_path + os .pathsep
309
310
310
311
result , output = spawn (cmds , env = env , out_to_screen = False )
311
312
@@ -320,21 +321,11 @@ def setup_idf_environ():
320
321
for line in output
321
322
}
322
323
323
- print (temp_env )
324
-
325
324
if 'PATH' in temp_env :
326
325
env ['PATH' ] = temp_env ['PATH' ]
327
326
elif 'path' in temp_env :
328
327
env ['PATH' ] = temp_env ['path' ]
329
328
330
- if 'IDF_PATH' in temp_env :
331
- env ['IDF_PATH' ] = temp_env ['IDF_PATH' ]
332
- elif 'idf_path' in temp_env :
333
- env ['IDF_PATH' ] = temp_env ['idf_path' ]
334
- else :
335
- print (output )
336
- raise RuntimeError (f'"IDF_PATH" not found in environment.' )
337
-
338
329
else :
339
330
args = sys .argv [:]
340
331
You can’t perform that action at this time.
0 commit comments