Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

'socket npm' overrides NODE_OPTIONS #1036

Copy link
Copy link

Description

@pimterry
Issue body actions

To demo, in package.json:

  "scripts": {
    "echo": "echo $NODE_OPTIONS",
  }

Running npm directly:

➜ NODE_OPTIONS=test npm run echo

> echo
> echo $NODE_OPTIONS

test

Running with socket-cli:

➜ NODE_OPTIONS=test socket npm run echo
   _____         _       _        /---------------
  |   __|___ ___| |_ ___| |_      | CLI: v1.1.34
  |__   | . |  _| '_| -_|  _|     | token: (not set), org: (not set)
  |_____|___|___|_,_|___|_|.dev   | Command: `socket npm`, cwd: ~/.../


> echo
> echo $NODE_OPTIONS

'--permission --allow-child-process --allow-fs-read=* --allow-fs-write=/home/.../* --allow-fs-write=/home/.../npm-installation/* --allow-fs-write=/home/.../.npm/*'

This makes it impossible to use socket npm as a drop in replacement if you configure NODE_OPTIONS globally, since any such kind of configuration is ignored.

Imo Socket should include globally set options in addition to it's own additions - it shouldn't replace them entirely.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.