diff --git a/archivebox/abx/archivebox/base_binary.py b/archivebox/abx/archivebox/base_binary.py index c86d0f8b..27fa68ff 100644 --- a/archivebox/abx/archivebox/base_binary.py +++ b/archivebox/abx/archivebox/base_binary.py @@ -60,15 +60,12 @@ class BaseBinary(BaseHook, Binary): if not (binary.abspath and binary.abspath.exists()): return - try: - bin_dir.mkdir(parents=True, exist_ok=True) - symlink = bin_dir / binary.name - symlink.unlink(missing_ok=True) - symlink.symlink_to(binary.abspath) - except Exception as err: - # print('[red]:warning: Failed to symlink binary into ./lib/bin folder[/red]', err) - pass - + bin_dir.mkdir(parents=True, exist_ok=True) + symlink = bin_dir / binary.name + symlink.unlink(missing_ok=True) + symlink.symlink_to(binary.abspath) + symlink.chmod(0o777) # make sure its executable by everyone + @validate_call def load(self, **kwargs) -> Self: binary = super().load(**kwargs) diff --git a/archivebox/plugins_extractor/chrome/apps.py b/archivebox/plugins_extractor/chrome/apps.py index 98bc93b7..796a51c5 100644 --- a/archivebox/plugins_extractor/chrome/apps.py +++ b/archivebox/plugins_extractor/chrome/apps.py @@ -75,7 +75,7 @@ def create_macos_app_symlink(target: Path, shortcut: Path): # TODO: should we enforce this? is it useful in any other situation? # if platform.system().lower() != 'darwin': # raise Exception(...) - + shortcut.unlink(missing_ok=True) shortcut.write_text(f"""#!/usr/bin/env bash\nexec '{target}' "$@"\n""") shortcut.chmod(0o777) # make sure its executable by everyone @@ -226,6 +226,7 @@ class ChromeBinary(BaseBinary): create_macos_app_symlink(binary.abspath, symlink) else: # otherwise on linux we can symlink directly to binary executable + symlink.unlink(missing_ok=True) symlink.symlink_to(binary.abspath) @staticmethod