Skip to content

[BUG] npm explore shell spawning without arguments immediately terminates (!isWindows) #783

Description

@jasisk

What / Why

The shell spawned by npm explore <package> (no additional arguments) terminates immediately.

When

npm explore <package>

Where

npm cli

How

The shell is spawned erroneously with the arguments ['-c', '']. This is because of a faulty args truthiness check rather than a length check.

Current Behavior

$ echo $SHLVL
1

$ npm explore packagename

$ echo $SHLVL
1

Steps to Reproduce

npm explore <packagename>

Expected Behavior

$ echo $SHLVL
1

$ npm explore packagename

Exploring /path/to/node_modules/packagename
Type 'exit' or ^D when finished

$ echo $SHLVL
2

Who

  • @npm/cli-team

References

  • n/a

Activity

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

    Bugthing that needs fixing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions