Skip to content

[BUG] v12.0.2 breaks npm test "hash character in working directory path" #203

@TrevorBurnham

Description

@TrevorBurnham

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I noticed something surprising while submitted a patch to npm/cli (npm/cli#8108): On the current latest branch (3a80a7b7), if I run node ./scripts/resetdeps.js in accordance with the Contributing docs, npm-package-arg gets updated from 12.0.1 to 12.0.2. After that change, the test "hash character in working directory path" fails:

 FAIL ​ test/lib/commands/link.js 1 failed of 15 3s
 ✖Could not read package.json: Error: ENOENT: no such file or directory, open '/code/npm-cli/test/lib/commands/tap-testdir-link-hash
  -character-in-working-directory-path/other/i_like_%23_in_my_paths/test-pkg-link/package.json'

Expected Behavior

As a contributor to npm/cli, I would expect all tests to pass after I pull latest and run node ./scripts/resetdeps.js.

Steps To Reproduce

git clone https://github.com/npm/cli.git
cd cli
node ./scripts/resetdeps.js
node . run test test/lib/commands/link.js

Environment

As the failing CI tests for npm/cli#8108 show, this issue is happening across all environments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds an initial review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions