mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Better handling of the missed args for exec command // Resolve #5047
This commit is contained in:
@ -54,7 +54,7 @@ def package_exec_cmd(obj, package, call, args):
|
|||||||
os.environ["PIO_PYTHON_EXE"] = get_pythonexe_path()
|
os.environ["PIO_PYTHON_EXE"] = get_pythonexe_path()
|
||||||
|
|
||||||
# inject current python interpreter on Windows
|
# inject current python interpreter on Windows
|
||||||
if args[0].endswith(".py"):
|
if args and args[0].endswith(".py"):
|
||||||
args = [os.environ["PIO_PYTHON_EXE"]] + list(args)
|
args = [os.environ["PIO_PYTHON_EXE"]] + list(args)
|
||||||
if not os.path.exists(args[1]):
|
if not os.path.exists(args[1]):
|
||||||
args[1] = where_is_program(args[1])
|
args[1] = where_is_program(args[1])
|
||||||
|
Reference in New Issue
Block a user