mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-10-25 11:23:22 +00:00 
			
		
		
		
	 43deee5374
			
		
	
	43deee5374
	
	
	
		
			
			Importing esptool in wrappers could cause importing the wrapper itself. Updating the PATH is not reliable. For example, os.path.realpath() changes the Windows driver letter to uppercase therefore, misses the right path for users with small device letters in their PATH. Removing paths without considering cases could also lead to errors. This fix invokes esptool scripts as modules without the need to importing them. Closes https://github.com/espressif/esp-idf/issues/9861 Closes https://github.com/espressif/vscode-esp-idf-extension/issues/791
		
			
				
	
	
		
			12 lines
		
	
	
		
			259 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			259 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| #
 | |
| # SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
 | |
| #
 | |
| # SPDX-License-Identifier: Apache-2.0
 | |
| #
 | |
| 
 | |
| import subprocess
 | |
| import sys
 | |
| 
 | |
| if __name__ == '__main__':
 | |
|     sys.exit(subprocess.run([sys.executable, '-m', 'esptool'] + sys.argv[1:]).returncode)
 |