Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use NODE_BINARY as per https://github.com/getsentry/sentry-react-native/pull/2805 #379

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jmatsushita
Copy link

Checklist

Why

When running a build from XCode, if the node path is non standard (for instance set with a nix develop environment) the expected path should be set in .xcode.env or .xcode.env.local and scripts should use $NODE_BINARY instead of node. @sentry/react-native already implemented this here getsentry/sentry-react-native#2805 so this expo wrapper should also use $NODE_BINARY.

How

Replace the 2 instances of node by $NODE_BINARY.

Test Plan

Tested locally.

@jmatsushita jmatsushita marked this pull request as draft November 27, 2023 11:55
@jmatsushita
Copy link
Author

jmatsushita commented Nov 27, 2023

Unfortunately that's not enough because @sentry/cli's bin script has a node shebang getsentry/sentry-cli#421

EDIT: fixed with the commit below.

@jmatsushita
Copy link
Author

Note: this should only be an issue when node is not installed globally.

In order for the @sentry/cli shebang line to work #!/usr/bin/env node we need to call the script with node in the path. We do this by adding dirname $NODE_BINARY to the PATH when calling @sentry/cli.

@jmatsushita jmatsushita marked this pull request as ready for review November 27, 2023 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant