Skip to content

Commit e5c04b2

Browse files
committed
[nrf noup] Check if ZAP file was found
Don't run `update_zcl_in_zap` if ZAP file was not found Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
1 parent 51b36dd commit e5c04b2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

scripts/west/zap_gui.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,13 @@ def do_run(self, args, unknown_args):
7070
zap_installer = ZapInstaller(args.matter_path)
7171
zap_installer.update_zap_if_needed()
7272

73-
# The zcl.json path in the .zap file must be the same as the one provided by the user
74-
# If not, update the .zap file with the new relative path to the zcl.json file.
75-
# After that we must clear the ZAP cache.
76-
was_updated = update_zcl_in_zap(zap_file_path, zcl_json_path, app_templates_path)
77-
if args.cache and was_updated:
78-
log.wrn("ZCL file path in the ZAP file has been updated. The ZAP cache must be cleared to use it.")
73+
if zap_file_path is not None:
74+
# The zcl.json path in the .zap file must be the same as the one provided by the user
75+
# If not, update the .zap file with the new relative path to the zcl.json file.
76+
# After that we must clear the ZAP cache.
77+
was_updated = update_zcl_in_zap(zap_file_path, zcl_json_path, app_templates_path)
78+
if args.cache and was_updated:
79+
log.wrn("ZCL file path in the ZAP file has been updated. The ZAP cache must be cleared to use it.")
7980

8081
cmd = [zap_installer.get_zap_path()]
8182
cmd += [zap_file_path] if zap_file_path else []

0 commit comments

Comments
 (0)