Skip to content

Commit

Permalink
zap-generate command: added fallback in case the output dir
Browse files Browse the repository at this point in the history
is not provided
  • Loading branch information
markaj-nordic committed Apr 9, 2024
1 parent b4f9ad8 commit 28bb9ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/setup/nrfconnect/zap_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@ def do_add_parser(self, parser_adder):
return parser

def do_run(self, args, unknown_args):
zap_path = find_zap()
if args.zap_file is None:
zap_path = find_zap()
if zap_path is not None:
args.zap_file = zap_path
else:
log.err("No valid .zap file provided")
sys.exit(0)
else:
args.zap_file = Path(args.zap_file).absolute()

if args.output is None:
args.output = args.zap_file.parent.absolute() / "zap-generated"

MATTER_PATH = str(Path(self.manifest.path).parent.absolute() / "../modules/lib/matter")
APP_TEMPLATES = MATTER_PATH + "/src/app/zap-templates/app-templates.json"
Expand Down

0 comments on commit 28bb9ee

Please sign in to comment.