-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request