File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
packages/nextjs/src/config Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 11/* eslint-disable max-lines */
2+ // eslint-disable-next-line import/no-extraneous-dependencies
3+ import SentryCLI from '@sentry/cli' ;
24import { getSentryRelease } from '@sentry/node' ;
35import { arrayify , dropUndefinedKeys , escapeStringForRegex , logger } from '@sentry/utils' ;
46import { default as SentryWebpackPlugin } from '@sentry/webpack-plugin' ;
@@ -464,12 +466,7 @@ export function getWebpackPluginOptions(
464466 * ref: https://github.com/vercel/nft/issues/203
465467 */
466468function ensureCLIBinaryExists ( ) : boolean {
467- for ( const node_modulesPath of module . paths ) {
468- if ( fs . existsSync ( path . resolve ( node_modulesPath , '@sentry/cli/sentry-cli' ) ) ) {
469- return true ;
470- }
471- }
472- return false ;
469+ return fs . existsSync ( SentryCLI . getPath ( ) ) ;
473470}
474471
475472/** Check various conditions to decide if we should run the plugin */
You can’t perform that action at this time.
0 commit comments