Skip to content

Commit 0be1eb3

Browse files
committed
Added logic to client version checking functions to resolve proxy paths
1 parent c95ddf4 commit 0be1eb3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/murfey/client/update.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ def check(api_base: ParseResult, install: bool = True, force: bool = False):
1515
If the version number is outside the allowed range then this can trigger
1616
an update on the client, and in that case will terminate the process.
1717
"""
18+
proxy_path = api_base.path
1819
version_check_url = api_base._replace(
19-
path="/version", query=f"client_version={murfey.__version__}"
20+
path=f"{proxy_path}/version", query=f"client_version={murfey.__version__}"
2021
)
2122
server_reply = requests.get(version_check_url.geturl())
2223
if server_reply.status_code != 200:
@@ -59,6 +60,7 @@ def install_murfey(api_base: ParseResult, version: str) -> bool:
5960
Return 'true' on success and 'false' on error."""
6061

6162
assert api_base.hostname is not None
63+
proxy_path = api_base.path
6264
result = subprocess.run(
6365
[
6466
sys.executable,
@@ -67,7 +69,7 @@ def install_murfey(api_base: ParseResult, version: str) -> bool:
6769
"--trusted-host",
6870
api_base.hostname,
6971
"-i",
70-
api_base._replace(path="/pypi", query="").geturl(),
72+
api_base._replace(path=f"{proxy_path}/pypi", query="").geturl(),
7173
f"murfey[client]=={version}",
7274
]
7375
)

0 commit comments

Comments
 (0)