Skip to content

Commit fa20a31

Browse files
committed
Use getPath to locate CLI.
1 parent 038577a commit fa20a31

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/remix/scripts/injectDebugId.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
/* eslint-disable no-console */
22
const { execSync } = require('child_process');
33

4+
const SentryCli = require('@sentry/cli');
5+
46
function injectDebugId(buildPath) {
7+
const cliPath = SentryCli.getPath();
8+
59
try {
6-
execSync(`node ./node_modules/@sentry/cli/bin/sentry-cli sourcemaps inject ${buildPath}`);
10+
execSync(`${cliPath} sourcemaps inject ${buildPath}`);
711
} catch (error) {
812
console.warn('[sentry] Failed to inject debug ids.');
913
console.error(error);

0 commit comments

Comments
 (0)