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

fix: Correctly detect local binary when installing via npm #1695

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

"You know what they say. Fool me once, strike one, but fool me twice... strike three." — Michael Scott

## 2.20.1

### Various fixes and improvements

- fix: Correctly detect local binary when installing via npm (#1695)

## 2.20.0

### Various fixes and improvements
Expand Down
4 changes: 3 additions & 1 deletion scripts/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ async function downloadBinary() {

if (process.env.SENTRYCLI_USE_LOCAL === '1') {
try {
const binPath = which.sync('sentry-cli');
const binPaths = which.sync('sentry-cli', { all: true });
if (!binPaths.length) throw new Error('Binary not found');
const binPath = binPaths[binPaths.length - 1];
logger.log(`Using local binary: ${binPath}`);
fs.copyFileSync(binPath, outputPath);
return Promise.resolve();
Expand Down
Loading