diff --git a/scripts/agent-health-check.py b/scripts/agent-health-check.py index 25261c2..f9c85d6 100755 --- a/scripts/agent-health-check.py +++ b/scripts/agent-health-check.py @@ -61,8 +61,11 @@ INFISICAL_API_URL = os.environ.get("INFISICAL_API_URL", "https://vault.sysloggh. if not INFISICAL_TOKEN: _token_path = os.path.expanduser("~/.infisical-token") if os.path.isfile(_token_path): - with open(_token_path) as _f: - INFISICAL_TOKEN = _f.read().strip() + try: + with open(_token_path) as _f: + INFISICAL_TOKEN = _f.read().strip() + except (OSError, UnicodeDecodeError): + pass # ── Helpers ──────────────────────────────────────────────────────────