Skip to content

Commit

Permalink
remove ipm_package.json from readonly, let IPM install non verified IPs
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwan Abbas authored and Marwan Abbas committed Jul 23, 2024
1 parent dd2384a commit 06dc8e0
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions ipm/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,6 @@ def find_verified_ip(
elif version not in releases:
raise RuntimeError(f"Version {version} of {ip_name} not found in IP index")
release = releases[version]
if release["status"] != "verified":
raise RuntimeError(
f"{ip_name}@{version} is not verified and cannot be used."
)
repo: str = meta["repo"]
if repo.startswith("github.com/"):
repo = repo[len("github.com/") :]
Expand Down Expand Up @@ -902,12 +898,13 @@ def change_dir_to_readonly(dir):
directory_name: The name of the directory to check.
"""
for file_name in os.listdir(dir):
file_path = os.path.join(dir, file_name)
if os.path.isfile(file_path):
if os.access(file_path, os.W_OK):
os.chmod(file_path, 0o400)
else:
change_dir_to_readonly(file_path)
if "ipm_package.json" not in file_name:
file_path = os.path.join(dir, file_name)
if os.path.isfile(file_path):
if os.access(file_path, os.W_OK):
os.chmod(file_path, 0o400)
else:
change_dir_to_readonly(file_path)


def get_latest_version(data):
Expand Down

0 comments on commit 06dc8e0

Please sign in to comment.