tools: install Codex into the worker executable path
Use a global npm install within the service user's prefix so the configured .local/bin launcher exists. Exercise npm with an offline synthetic package and check the installed launcher without contacting a provider. Refs #19
This commit is contained in:
@@ -121,7 +121,7 @@ def official_clis(providers):
|
||||
script.chmod(0o644)
|
||||
as_user("finaltoken", WORKER_HOME, ["bash", str(script), "stable"])
|
||||
if "codex" in providers and not (WORKER_HOME / ".local/bin/codex").exists():
|
||||
as_user("finaltoken", WORKER_HOME, ["npm", "install", "--prefix", str(WORKER_HOME / ".local"), "@openai/codex@latest"])
|
||||
as_user("finaltoken", WORKER_HOME, ["npm", "install", "--global", "--prefix", str(WORKER_HOME / ".local"), "@openai/codex@latest"])
|
||||
for provider in providers:
|
||||
as_user("finaltoken", WORKER_HOME, [str(WORKER_HOME / ".local/bin" / provider), "--version"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user