File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -921,19 +921,17 @@ def compile(): # NOQA
921
921
if ret_code != 0 :
922
922
sys .exit (ret_code )
923
923
924
- if 'To flash, run this command:' in output :
925
- output = output .split ('To flash, run this command:' )[- 1 ].strip ()
926
- output = output .split ('\n ' )[0 ]
927
-
928
- python_path , output = output .split ('python ' , 1 )
929
- python_path += 'python'
930
-
931
- esp_tool_path , output = output .split ('esptool.py ' , 1 )
932
- esp_tool_path += 'esptool.py'
933
- esp_tool_path = esp_tool_path .replace (
934
- '../../../' ,
935
- os .getcwd () + '/lib/'
936
- )
924
+ if 'To flash, run:' in output :
925
+ output = output .split ('To flash, run:' )[- 1 ].strip ()
926
+
927
+ espressif_path = "~/.espressif"
928
+ python_path = f'{ espressif_path } /python_env/idf5.2_py3.10_env/bin'
929
+ esp_tool_path = f'{ python_path } /esptool.py'
930
+
931
+ output = output .split ('python ' , 1 )[- 1 ]
932
+ output = output .split ('\n ' , 1 )[0 ]
933
+ output = f'{ python_path } /python { output } '
934
+ output = output .replace ('esptool.py' , esp_tool_path )
937
935
938
936
out_cmd = []
939
937
You can’t perform that action at this time.
0 commit comments