Builds on previous commit.
Note: Getting the project version still pases --tags so still works with plain
tags, to keep compatibility for existing projects
This allows the processes launched from idf_tools.py to use the value
of IDF_PATH. One such example is the installation of Python packages,
when requirements.txt uses IDF_PATH to refer to the esp-windows-curses
package.
Closes https://github.com/espressif/esp-idf/issues/4341
use `subprocess.Popen` when catch TypeError:
```
Traceback (most recent call last):
File "tools/idf_tools.py", line 1249, in <module>
main(sys.argv[1:])
File "tools/idf_tools.py", line 1245, in main
action_func(args)
File "tools/idf_tools.py", line 1038, in action_install
tool_obj.find_installed_versions()
File "tools/idf_tools.py", line 468, in find_installed_versions
ver_str = self.check_version()
File "tools/idf_tools.py", line 426, in check_version
version_cmd_result = run_cmd_check_output(cmd, None, extra_paths)
File "tools/idf_tools.py", line 176, in run_cmd_check_output
result = subprocess.run(cmd, capture_output=True, check=True, input=input_text)
File "/opt/pyenv/pyenv-1.2.6/versions/3.5.5/lib/python3.5/subprocess.py", line 383, in run
with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'
```