File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
packages/profiling-node/src Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,13 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
5454 return createdRequire ( `${ binaryPath } .node` ) ;
5555 }
5656
57+ // @electron /rebuild generates the binary in the generic node-gyp directory
58+ try {
59+ return createdRequire ( '../../build/Release/sentry_cpu_profiler.node' ) ;
60+ } catch ( _ ) {
61+ // ignore
62+ }
63+
5764 // We need the fallthrough so that in the end, we can fallback to the dynamic require.
5865 // This is for cases where precompiled binaries were not provided, but may have been compiled from source.
5966 if ( platform === 'darwin' ) {
@@ -169,13 +176,6 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
169176 }
170177 }
171178
172- // @electron /rebuild generates the binary in the generic node-gyp directory
173- try {
174- return createdRequire ( '../../build/Release/sentry_cpu_profiler.node' ) ;
175- } catch ( _ ) {
176- // ignore
177- }
178-
179179 const built_from_source_path = resolve ( esmCompatibleDirname , '..' , `sentry_cpu_profiler-${ identifier } ` ) ;
180180 return createdRequire ( `${ built_from_source_path } .node` ) ;
181181}
You can’t perform that action at this time.
0 commit comments