Skip to content

Commit e61acc7

Browse files
authored
do not overwrite an existing package.json
1 parent 19f024b commit e61acc7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

platform.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def install_tool(TOOL):
5757
sys.stderr.write("Error: Couldn't execute 'idf_tools.py install'\n")
5858
else:
5959
tl_path = "file://" + join(TOOLS_PATH_DEFAULT, "tools", TOOL)
60-
shutil.copyfile(TOOLS_PACK_PATH, join(TOOLS_PATH_DEFAULT, "tools", TOOL, "package.json"))
60+
if not bool(os.path.exists(join(TOOLS_PATH_DEFAULT, "tools", TOOL, "package.json"))):
61+
shutil.copyfile(TOOLS_PACK_PATH, join(TOOLS_PATH_DEFAULT, "tools", TOOL, "package.json"))
6162
pm.install(tl_path)
6263
return
6364

0 commit comments

Comments
 (0)