fix: cli not running (#703)

This commit is contained in:
Nico
2026-03-23 19:47:44 +01:00
committed by Nicolas Meienberger
parent 05dd440dea
commit 6553046767
3 changed files with 13 additions and 2 deletions

View File

@@ -56,6 +56,13 @@ jobs:
- name: Start zerobyte-e2e service
run: bun run start:e2e -- -d
- name: Check CLI version
run: |
expected_version=$(docker exec zerobyte printenv APP_VERSION)
cli_version=$(docker exec zerobyte bun run --silent cli --version)
echo "$cli_version"
test "$cli_version" = "$expected_version"
- name: Wait for zerobyte to be ready
run: |
timeout 30s bash -c 'until curl -f http://localhost:4096/api/healthcheck; do echo "Waiting for server..." && sleep 2; done'

View File

@@ -5,11 +5,15 @@ import { changeUsernameCommand } from "./commands/change-username";
import { disable2FACommand } from "./commands/disable-2fa";
import { rekey2FACommand } from "./commands/rekey-2fa";
import { resetPasswordCommand } from "./commands/reset-password";
import { config } from "../core/config";
import { db } from "../db/db";
const program = new Command();
program.name("zerobyte").description("Zerobyte CLI - Backup automation tool built on top of Restic").version("1.0.0");
program
.name("zerobyte")
.description("Zerobyte CLI - Backup automation tool built on top of Restic")
.version(config.appVersion);
program.addCommand(resetPasswordCommand);
program.addCommand(disable2FACommand);
program.addCommand(changeUsernameCommand);

View File

@@ -13,7 +13,7 @@
"start": "bun run .output/server/index.mjs",
"preview": "bunx --bun vite preview",
"cli:dev": "bun run app/server/cli/main.ts",
"cli": "ZEROBYTE_CLI=1 bun .output/server/_ssr/index.mjs",
"cli": "ZEROBYTE_CLI=1 bun .output/server/_ssr/ssr.mjs",
"tsc": "tsc --noEmit && turbo run tsc",
"start:dev": "docker compose down && docker compose up --build zerobyte-dev",
"start:prod": "docker compose down && docker compose up --build zerobyte-prod",