Skip to content

Commit

Permalink
[nrf noup] Update generate.py script to make it work on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kkasperczyk-no authored and LuDuda committed Feb 15, 2023
1 parent dbc8ac0 commit ed6a5ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/tools/zap/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ def extractGeneratedIdl(output_dir, zap_config_path):
# multiple extensions. This is to work with existing codebase only
raise Error("Unexpected input zap file %s" % self.zap_config)

# If the ".matter" already exists in this location, some OS (e.g. Windows) will not allow to simply overwrite it.
if os.path.exists(target_path):
os.remove(target_path)

os.rename(idl_path, target_path)


Expand Down

0 comments on commit ed6a5ba

Please sign in to comment.