Skip to content

[API Bug] OpenAction should not set NODE_ENV and NODE_PATH environment variables #229

@BoruiGu

Description

@BoruiGu

Raycast version: 1.25.1

Description

environment variables NODE_ENV and NODE_PATH are supposed to only be set for the node process running the command, however OpenAction copies them into the opened application window

this causes issues for example when using OpenAction to launch vscode, the integrated terminal inside vscode will get the two environment variables and thus behavior of node / npm changes unexpectedly

slack convo
https://raycastcommunity.slack.com/archives/C01A0R0NXGQ/p1635090222013200

Steps To Reproduce

  1. make sure vscode is not running
  2. run “Search Recent Projects” command and use the command to open a vscode window
  3. in integrated terminal inside the vscode window, check environment variables

The current behavior

two environment variables are set

➤ env | rg NODE_
NODE_ENV=production
NODE_PATH=/Applications/Raycast.app/Contents/Resources/RaycastCommands_RaycastCommands.bundle/Contents/Resources/api/node_modules

The expected behavior

the two environment variables should not be copied into the opened window

Metadata

Metadata

Assignees

Labels

apiIssues related to APIbugSomething isn't workingstatus: fixed in next releaseThe issue will be closed once next release is available

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions