Skip to content

Supports pnpm/yarn for cmd auto upgrade and the taste cli #862

Description

@shunia

Feature Description

Both tools (command-code and taste) only respects npm, none of them work with pnpm. I always install packages or run packages with pnpm or pnpx, in this case, for command-code, it tries to install a newer version in the background with npm, which causes duplicate packages installed globally, and could potentially take place the installed binary with path sequence.

Also for the taste cli too, use pnpx taste push works, but it also only checks if npm has command-code installed.

Please fix this.

Use Case

No response

Additional Context

No response

How important is this to you?

Important for my workflow

Activity

  1. added theissue type on Sep 15, 2026
  2. PabloJustDevelops commented on Oct 1, 2026

    @PabloJustDevelops

    Adding hard data from an actual bun + fnm + npm machine, since this one is still open and the failure mode turns out to be more specific than "duplicate packages".

    What the auto-updater actually runs

    From ~/.npm/_logs/2026-10-01T10_47_22_786Z-debug-0.log, triggered by the background auto-update:

    npm install --global --prefix <npm-prefix>/lib/node_modules/.command-code-stage-53164 command-code@1.73.2 --no-audit --no-fund --no-progress
    

    It installs into a staging dir under the npm prefix, and the result ends up at <npm-prefix>/lib/node_modules/command-code. No bin links are ever created in <npm-prefix>/bin.

    The package manager is hardcoded

    In dist/cli.mjs (v1.73.2) I count:

    String Occurrences
    npm i -g 6
    npm install -g 2
    bunx 1
    pnpm / yarn globals 0

    Nothing inspects which package manager actually installed the running binary, so the version on disk and the version that gets updated drift apart silently.

    Result: silent no-op plus a 252 MB orphan

    Three copies existed simultaneously on my machine:

    Location Version On PATH?
    ~/.bun/install/global/node_modules/command-code 1.72.4 yes, via ~/.bun/bin
    ~/.local/share/fnm/node-versions/v24.20.0/installation/lib/node_modules/command-code 1.65.0, auto-updated to 1.73.2 no bin links, 252 MB
    /usr/lib/node_modules/command-code 1.39.3 no

    The npm-prefix copy had no bin entries at all, so cmd --version kept reporting 1.72.4 while 252 MB of a newer version sat next to it. Nothing was printed about it. This is the same silent no-op reported in #666, and it silently burns disk on every update.

    A smaller fix that would help everyone

    Detecting the manager that owns the running binary would also fix the npm-only case, not just pnpm/yarn/bun. Even just resolving the real path of the running executable and, if it does not live in the npm prefix, skipping the self-update with a one-line hint naming the correct command would avoid the orphan and the false success, without having to maintain a manager matrix.

    Full ask

    A persistent packageManager setting (npm | bun | pnpm | yarn) in /config, defaulting to npm, plus a real Auto-update toggle there. Today the only controls are --no-auto-update for a single run and the COMMANDCODE_SKIP_UPDATES env var, so there is nowhere to make that choice.

    Happy to provide the full npm logs, npm ls -g and bun pm ls -g output if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions