Skip to content

Commit 94b248f

Browse files
committed
Add clear error if user on unsupported platform
1 parent 04c40de commit 94b248f

File tree

1 file changed

+3
-0
lines changed
  • src/confcom/azext_confcom/lib

1 file changed

+3
-0
lines changed

src/confcom/azext_confcom/lib/opa.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828

2929
def opa_get():
3030

31+
if not all(platform.system() in mapping for mapping in [_opa_url, _expected_sha256]):
32+
raise RuntimeError(f"OPA is not supported on platform: {platform.system()}")
33+
3134
opa_fetch_resp = requests.get(_opa_url[platform.system()], verify=True)
3235
opa_fetch_resp.raise_for_status()
3336

0 commit comments

Comments
 (0)