Skip to content

Commit ba717a2

Browse files
committed
Merge branch 'bugfix/verify-directory-exists' into 'master'
Bugfix: add check for existence build directory Closes IDF-984 See merge request espressif/esp-idf!9695
2 parents 7766cb8 + 25b4b97 commit ba717a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/idf_py_actions/serial_ext.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,18 @@ def monitor(action, ctx, args, print_filter, monitor_baud, encrypted):
109109
run_tool("idf_monitor", monitor_args, args.project_dir)
110110

111111
def flash(action, ctx, args):
112-
ensure_build_directory(args, ctx.info_name)
113112
"""
114113
Run esptool to flash the entire project, from an argfile generated by the build system
115114
"""
115+
ensure_build_directory(args, ctx.info_name)
116116
if args.port is None:
117117
args.port = _get_default_serial_port()
118118

119119
run_target(action, args, {"ESPPORT": args.port,
120120
"ESPBAUD": str(args.baud)})
121121

122122
def erase_flash(action, ctx, args):
123+
ensure_build_directory(args, ctx.info_name)
123124
esptool_args = _get_esptool_args(args)
124125
esptool_args += ["erase_flash"]
125126
run_tool("esptool.py", esptool_args, args.build_dir)

0 commit comments

Comments
 (0)