checking binary installation before running

This commit is contained in:
Kumaraguru 2024-12-09 14:17:07 +00:00
parent 3af99c4691
commit faa277cb39
No known key found for this signature in database
GPG Key ID: 4E4555A84ECD28F7
4 changed files with 18 additions and 0 deletions

BIN
codex-v0.1.9-darwin-arm64 Executable file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
c1a32dc73c6b29eaf462442d93e3f657ef8076e84480409d6c40c64fa3e96bc4 codex-v0.1.9-darwin-arm64.tar.gz

View File

@ -226,7 +226,24 @@ async function isNodeRunning() {
}
}
async function isCodexInstalled() {
try {
await runCommand('codex --version');
return true;
} catch (error) {
return false;
}
}
async function runCodex() {
// First check if Codex is installed
const isInstalled = await isCodexInstalled();
if (!isInstalled) {
console.log(showErrorMessage('Codex is not installed. Please install Codex first using option 1 from the main menu.'));
await showNavigationMenu();
return;
}
const nodeAlreadyRunning = await isNodeRunning();
if (nodeAlreadyRunning) {