AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
Python ai-promptsai-skillblueskyclaudeclaude-codeclawhubdeep-researchhackernewsinstagramopenclawpolymarketrecencyredditresearchsocial-mediatiktoktrendstwitterweb-searchyoutube
fix(xurl): treat PermissionError from PATH lookup as unavailable (#322)
Ilia Alshanetsky5b87cca886c9
diff --git a/skills/last30days/scripts/lib/xurl_x.py b/skills/last30days/scripts/lib/xurl_x.pyindex 994b58c3..c2a60ef8 100644--- a/skills/last30days/scripts/lib/xurl_x.py+++ b/skills/last30days/scripts/lib/xurl_x.py@@ -46,9 +46,10 @@ def is_available() -> bool:timeout=10,)return result.returncode == 0 and '"username"' in result.stdout- except FileNotFoundError:- return False- except subprocess.TimeoutExpired:+ except (OSError, subprocess.TimeoutExpired):+ # OSError covers FileNotFoundError (no xurl on PATH) and+ # PermissionError (a non-executable match on PATH, e.g. WSL's+ # /mnt/c/.../WindowsApps shim returning EACCES on exec).return Falsediff --git a/tests/test_xurl_x.py b/tests/test_xurl_x.pyindex 14bce720..7f79e099 100644--- a/tests/test_xurl_x.py+++ b/tests/test_xurl_x.py@@ -44,6 +44,13 @@ class TestIsAvailable(unittest.TestCase):with mock.patch("subprocess.run", side_effect=FileNotFoundError):self.assertFalse(xurl_x.is_available())+ def test_returns_false_on_permission_error(self):+ # WSL hits this when a Windows-mounted PATH entry points at an+ # exec-blocked shim (e.g. WindowsApps), which raises PermissionError+ # before any other PATH candidate is tried.+ with mock.patch("subprocess.run", side_effect=PermissionError(13, "Permission denied", "xurl")):+ self.assertFalse(xurl_x.is_available())+def test_returns_false_on_timeout(self):import subprocesswith mock.patch("subprocess.run", side_effect=subprocess.TimeoutExpired("xurl", 10)):