diff --git a/README.md b/README.md index 8b7944b..aaf56e1 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ codevhub skill office --dir /media/usb/codev-office # download somewhere else Both files land side by side, and the command prints the exact line to run from that folder (`bash codev-office--setup.sh`, or `powershell -ExecutionPolicy Bypass -File .\codev-office-windows-setup.ps1`). A bundle downloaded for another OS is never executed on this machine. -Two flags are passed straight through to the setup script: `--minimal` (skip the optional extras) and `--skip-verify` (skip the bundle's own SHA-256 check). +Two flags are passed straight through to the setup script: `--skip-verify` (skip the bundle's own SHA-256 check) and `--force-skills` (replace already-installed skills with the bundled versions). ## Switching between self-hosted and proprietary models diff --git a/src/lib/help.ts b/src/lib/help.ts index a94d059..68fc836 100644 --- a/src/lib/help.ts +++ b/src/lib/help.ts @@ -55,8 +55,8 @@ Skill hub: (--platform ubuntu|macos|windows to fetch for another OS [implies --download-only], --dir for the download folder, --download-only to skip running the installer, - --minimal / --skip-verify passed through to the - installer, --force-skills to replace already-installed - skills with the bundled versions) + --skip-verify passed through to the installer, + --force-skills to replace already-installed skills + with the bundled versions) `); } diff --git a/src/lib/office.ts b/src/lib/office.ts index 6d5345e..3f294ca 100644 --- a/src/lib/office.ts +++ b/src/lib/office.ts @@ -15,7 +15,7 @@ import { officeDownloadsDir } from "@/lib/paths.js"; // installer that prompts for sudo/UAC, which an Ink render would fight over. export const OFFICE_USAGE = - "Usage: codevhub skill office [--platform ubuntu|macos|windows] [--dir ] [--download-only] [--minimal] [--skip-verify] [--force-skills]"; + "Usage: codevhub skill office [--platform ubuntu|macos|windows] [--dir ] [--download-only] [--skip-verify] [--force-skills]"; export type OfficePlatform = "ubuntu" | "macos" | "windows"; @@ -34,7 +34,6 @@ export interface OfficeArgs { platform?: OfficePlatform; dir?: string; downloadOnly: boolean; - minimal: boolean; skipVerify: boolean; forceSkills: boolean; // Deliberately unadvertised (absent from OFFICE_USAGE and `codevhub help`): @@ -50,7 +49,6 @@ export interface OfficeArgs { export function parseOfficeArgs(argv: string[]): OfficeArgs { const parsed: OfficeArgs = { downloadOnly: false, - minimal: false, skipVerify: false, forceSkills: false, uninstall: false, @@ -91,9 +89,6 @@ export function parseOfficeArgs(argv: string[]): OfficeArgs { case "--download-only": parsed.downloadOnly = true; break; - case "--minimal": - parsed.minimal = true; - break; case "--skip-verify": parsed.skipVerify = true; break; @@ -120,9 +115,9 @@ export function parseOfficeArgs(argv: string[]): OfficeArgs { // The two modes take disjoint flag sets — reject mixtures loudly rather // than silently forwarding a flag the target script would choke on. if (parsed.uninstall) { - if (parsed.minimal || parsed.skipVerify || parsed.forceSkills) { + if (parsed.skipVerify || parsed.forceSkills) { parsed.error = - "--minimal/--skip-verify/--force-skills do not apply with --uninstall"; + "--skip-verify/--force-skills do not apply with --uninstall"; } } else if (parsed.yes || parsed.skillsOnly || parsed.purgeDownloads) { parsed.error = "--yes/--skills-only/--purge-downloads require --uninstall"; @@ -206,16 +201,14 @@ export function installerArgs( platform: OfficePlatform, ): string[] { // The bash scripts take GNU-style flags; the PowerShell script takes - // -Minimal / -SkipVerify / -ForceSkills switches. + // -SkipVerify / -ForceSkills switches. if (platform === "windows") { return [ - ...(parsed.minimal ? ["-Minimal"] : []), ...(parsed.skipVerify ? ["-SkipVerify"] : []), ...(parsed.forceSkills ? ["-ForceSkills"] : []), ]; } return [ - ...(parsed.minimal ? ["--minimal"] : []), ...(parsed.skipVerify ? ["--skip-verify"] : []), ...(parsed.forceSkills ? ["--force-skills"] : []), ]; diff --git a/tests/lib/download.test.ts b/tests/lib/download.test.ts index ac60678..3f1b5ff 100644 --- a/tests/lib/download.test.ts +++ b/tests/lib/download.test.ts @@ -317,7 +317,7 @@ describe("runSkillOffice", () => { const dir = join(tempDir, "office"); let spawned: { command: string; args: string[]; cwd: string } | null = null; const code = await runSkillOffice( - ["--dir", dir, "--minimal", "--skip-verify"], + ["--dir", dir, "--skip-verify"], baseUrl, async (command, args, cwd) => { spawned = { command, args, cwd }; @@ -327,7 +327,7 @@ describe("runSkillOffice", () => { expect(code).toBe(0); expect(spawned).toEqual({ command: "bash", - args: [join(dir, scriptName), "--minimal", "--skip-verify"], + args: [join(dir, scriptName), "--skip-verify"], cwd: dir, }); }); @@ -398,7 +398,7 @@ describe("runSkillOffice", () => { let spawned: { command: string; args: string[]; cwd: string } | null = null; const code = await withPlatform("win32", () => runSkillOffice( - ["--dir", dir, "--minimal", "--skip-verify"], + ["--dir", dir, "--skip-verify"], baseUrl, async (command, args, cwd) => { spawned = { command, args, cwd }; @@ -414,7 +414,6 @@ describe("runSkillOffice", () => { "Bypass", "-File", join(dir, "codev-office-windows-setup.ps1"), - "-Minimal", "-SkipVerify", ], cwd: dir, @@ -468,7 +467,6 @@ describe("runSkillOffice", () => { const NO_FLAGS = { downloadOnly: false, - minimal: false, skipVerify: false, forceSkills: false, uninstall: false, @@ -480,14 +478,12 @@ const NO_FLAGS = { describe("installerArgs", () => { const base = { ...NO_FLAGS, - minimal: true, skipVerify: true, forceSkills: true, }; test("bash platforms get GNU-style flags", () => { expect(installerArgs(base, "ubuntu")).toEqual([ - "--minimal", "--skip-verify", "--force-skills", ]); @@ -495,7 +491,6 @@ describe("installerArgs", () => { test("windows gets PowerShell switches", () => { expect(installerArgs(base, "windows")).toEqual([ - "-Minimal", "-SkipVerify", "-ForceSkills", ]); diff --git a/tests/lib/office.test.ts b/tests/lib/office.test.ts index 6510485..aed79bf 100644 --- a/tests/lib/office.test.ts +++ b/tests/lib/office.test.ts @@ -25,7 +25,6 @@ describe("parseOfficeArgs", () => { test("defaults", () => { expect(parseOfficeArgs([])).toEqual({ downloadOnly: false, - minimal: false, skipVerify: false, forceSkills: false, uninstall: false, @@ -42,7 +41,6 @@ describe("parseOfficeArgs", () => { "--dir", "/tmp/x", "--download-only", - "--minimal", "--skip-verify", "--force-skills", ]); @@ -50,7 +48,6 @@ describe("parseOfficeArgs", () => { platform: "windows", dir: "/tmp/x", downloadOnly: true, - minimal: true, skipVerify: true, forceSkills: true, uninstall: false, @@ -75,7 +72,7 @@ describe("parseOfficeArgs", () => { }); test("rejects install flags combined with --uninstall", () => { - expect(parseOfficeArgs(["--uninstall", "--minimal"]).error).toMatch( + expect(parseOfficeArgs(["--uninstall", "--skip-verify"]).error).toMatch( /do not apply with --uninstall/, ); });