Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions js/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function getBinaryPath() {
const parts = [];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use require.resolve instead here, like this:

path.join(require.resolve('@sentry/cli'), `../../bin/sentry-cli${process.platform === 'win32' ? '.exe' : ''}`)

Copy link
Contributor

@kamilogorek kamilogorek Apr 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, unfortunately, we specifically cannot use require.resolve due to @vercel/nft behavior.

See #1207 and a follow-up in #1374

parts.push(__dirname);
parts.push('..');
parts.push('bin');
parts.push(`sentry-cli${process.platform === 'win32' ? '.exe' : ''}`);
return path.resolve(...parts);
}
Expand Down