Skip to content

Commit dd3fe90

Browse files
committed
Better handling of the missed args for exec command // Resolve platformio#5047
1 parent c1afb36 commit dd3fe90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platformio/package/commands/exec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def package_exec_cmd(obj, package, call, args):
5454
os.environ["PIO_PYTHON_EXE"] = get_pythonexe_path()
5555

5656
# inject current python interpreter on Windows
57-
if args[0].endswith(".py"):
57+
if args and args[0].endswith(".py"):
5858
args = [os.environ["PIO_PYTHON_EXE"]] + list(args)
5959
if not os.path.exists(args[1]):
6060
args[1] = where_is_program(args[1])

0 commit comments

Comments
 (0)