feat(office): forward --target-user, and name the line the script really ends with - #254
Merged
Conversation
…lly ends with Two gaps found while documenting how to repair a Windows machine whose skills were installed into an admin account (codev-landing-page#110). --target-user forwards to both scripts as -TargetUser. It was the one flag codevhub could not express, and the only flag whose entire reason for existing is that a human is driving the install by hand - which is exactly when they reach for codevhub. Without it the documented recovery had to break out of the tool halfway through and tell people to type the second command themselves. It applies to install and uninstall alike: install puts the skills in the right profile, uninstall clears them out of one. Windows only, rejected elsewhere with the same shape as the existing --arch guard, because the bash scripts recover the invoking user from SUDO_USER and would choke on an unknown flag. The Windows manual handoff also told people to "Wait for the green Verification passed closing message" in BOTH modes. The uninstaller never prints that - it ends with "codev-office uninstall finished" - so anyone running --uninstall sat waiting for a message that was not coming. Each mode now names the line its own script actually ends with. For install that is "codev-office setup complete", which is unconditional, rather than "Verification passed", which is absent under --skip-verify. Tests cover both spellings of the flag, the missing-value rejection, legality in both modes, forwarding through installerArgs/uninstallerArgs, and the printed command for a domain-qualified account and for one containing a space. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two gaps found while documenting how to repair a Windows machine whose skills were installed into an admin account (quickbeard/codev-landing-page#110).
1.
--target-userwas the one flag codevhub could not expressinstallerArgsforwarded only--skip-verifyand--force-skills, and unknown flags are hard-rejected — so-TargetUserhad no route through the CLI at all.That is backwards:
-TargetUserexists because a human is driving the install by hand from an admin session, which is exactly when they reach for codevhub. The documented recovery had to break out of the tool halfway through and tell people to type the second command themselves.--archguard — the bash scripts recover the invoking user fromSUDO_USER, so there is nothing to name and an unknown flag would just make them choke.OFFICE_USAGE, unlike--uninstall. There is no reason to hide it, and the docs now point at it.2. Uninstall mode quoted a message the uninstaller never prints
The Windows manual handoff said, in both modes:
The uninstaller ends with
codev-office uninstall finished. So anyone running--uninstallsat waiting for a line that was never coming — the same class of bug as codev-scripts#29, which fixed the script side of exactly this.Each mode now names the line its own script actually ends with. For install that is
codev-office setup complete, which codev-scripts#29 made unconditional, rather thanVerification passed, which is absent under--skip-verify.Testing
pnpm check,pnpm typecheck,pnpm test(1414 passed, 76 files) andpnpm buildall pass. Nine new tests, verified to actually execute rather than silently skip:--target-user jdoeand--target-user=VTS\minhnh49installerArgsanduninstallerArgs, including combined with the existing switches, and that nothing is forwarded when absentVTS\minhnh49, unquoted) and for one containing a space ("First Last", quoted) — the value reaches PowerShell copy-pasteable either wayNot covered: the
--target-useron non-Windows rejection lives inrunSkillOffice, which does I/O and has no existing test harness — the neighbouring--archguard is untested for the same reason. I also could not exercise the printed handoff end-to-end, since it sits after the download from codev-storage; the unit tests cover the command string it composes.🤖 Generated with Claude Code