Skip to content

tests/tools: bare "npm" argv is not found on Windows (npm.cmd) -- sibling of #4939 #4969

Closed

Description

@squid-protocol

Sibling gap of #4939, found by the class sweep in PR #4967.

Class: Windows-unportable subprocess invocations in tests/tools. A bare launcher name in a subprocess argv (no shell=True) does not get PATHEXT applied, so .cmd launchers are not found on Windows.

Member Site Status
mvn / mvn.cmd det_survey, cics_crucible, equivalence_java, ... fixed in #4967 (maven_exe.mvn_executable)
npm / npm.cmd tests/tools/callgraph_refs.py:141 ["npm", "root", "-g"] open (this issue)

Fix: resolve npm through shutil.which the same way. Either generalise maven_exe into a which-based launcher resolver or add an npm twin. Then extend the AST guard in test_maven_exe_4939.py so it also rejects a literal "npm" argv.

Acceptance: no bare "npm" argv in tests/tools; the guard test covers it; and a monkeypatched-Windows test resolves npm.cmd.

Siblings: #4939

Activity

  1. added
    bug
    testing
    on Oct 12, 2026
  2. added
    scope:infra
    on Oct 16, 2026
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

    bugscope:infratesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions