mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 15:14:31 -04:00
ignore lib/bin symlinking errors
This commit is contained in:
parent
aae9deccc2
commit
de09867f87
2 changed files with 22 additions and 12 deletions
|
@ -60,11 +60,16 @@ class BaseBinary(BaseHook, Binary):
|
||||||
if not (binary.abspath and binary.abspath.exists()):
|
if not (binary.abspath and binary.abspath.exists()):
|
||||||
return
|
return
|
||||||
|
|
||||||
bin_dir.mkdir(parents=True, exist_ok=True)
|
try:
|
||||||
symlink = bin_dir / binary.name
|
bin_dir.mkdir(parents=True, exist_ok=True)
|
||||||
symlink.unlink(missing_ok=True)
|
symlink = bin_dir / binary.name
|
||||||
symlink.symlink_to(binary.abspath)
|
symlink.unlink(missing_ok=True)
|
||||||
symlink.chmod(0o777) # make sure its executable by everyone
|
symlink.symlink_to(binary.abspath)
|
||||||
|
symlink.chmod(0o777) # make sure its executable by everyone
|
||||||
|
except Exception as err:
|
||||||
|
# print(f'[red]:warning: Failed to symlink {symlink} -> {binary.abspath}[/red] {err}')
|
||||||
|
# not actually needed, we can just run without it
|
||||||
|
pass
|
||||||
|
|
||||||
@validate_call
|
@validate_call
|
||||||
def load(self, fresh=False, **kwargs) -> Self:
|
def load(self, fresh=False, **kwargs) -> Self:
|
||||||
|
|
|
@ -221,13 +221,18 @@ class ChromeBinary(BaseBinary):
|
||||||
bin_dir.mkdir(parents=True, exist_ok=True)
|
bin_dir.mkdir(parents=True, exist_ok=True)
|
||||||
symlink = bin_dir / binary.name
|
symlink = bin_dir / binary.name
|
||||||
|
|
||||||
if platform.system().lower() == 'darwin':
|
try:
|
||||||
# if on macOS, browser binary is inside a .app, so we need to create a tiny bash script instead of a symlink
|
if platform.system().lower() == 'darwin':
|
||||||
create_macos_app_symlink(binary.abspath, symlink)
|
# if on macOS, browser binary is inside a .app, so we need to create a tiny bash script instead of a symlink
|
||||||
else:
|
create_macos_app_symlink(binary.abspath, symlink)
|
||||||
# otherwise on linux we can symlink directly to binary executable
|
else:
|
||||||
symlink.unlink(missing_ok=True)
|
# otherwise on linux we can symlink directly to binary executable
|
||||||
symlink.symlink_to(binary.abspath)
|
symlink.unlink(missing_ok=True)
|
||||||
|
symlink.symlink_to(binary.abspath)
|
||||||
|
except Exception as err:
|
||||||
|
# print(f'[red]:warning: Failed to symlink {symlink} -> {binary.abspath}[/red] {err}')
|
||||||
|
# not actually needed, we can just run without it
|
||||||
|
pass
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def chrome_cleanup_lockfile():
|
def chrome_cleanup_lockfile():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue