Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).

## [Unreleased]

### Fixed
- **A `--help`/`-h` flag never executes a side-effectful subcommand.** `kit memory <subcommand> --help` (e.g. `kit memory install --help`) previously ran the subcommand instead of printing help, so `kit memory install --help` would actually install the hooks. It now shows help and does nothing else.

## [1.3.1] - 2026-06-17

### Security
Expand Down
3 changes: 3 additions & 0 deletions src/commands/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ import {
export async function cmdMemory(): Promise<boolean> {
const subcommand = process.argv[3];
if (!subcommand || subcommand === "--help" || subcommand === "-h") return memHelp();
// A --help/-h flag after a subcommand means "show help", never run a
// side-effectful subcommand (e.g. `kit memory install --help` must not install).
if (hasFlag(process.argv, "--help") || hasFlag(process.argv, "-h")) return memHelp();

// One handler per subcommand — keeps this dispatcher flat (was a complexity-132
// if-chain). Each handler reads process.argv itself, so no args thread through.
Expand Down
Loading