File tree Expand file tree Collapse file tree
packages/webpack-plugin/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -281,25 +281,26 @@ export function sentryWebpackPluginFactory({
281281 const freeGlobalDependencyOnBuildArtifacts = createDependencyOnBuildArtifacts ( ) ;
282282 const upload = createDebugIdUploadFunction ( { sentryBuildPluginManager } ) ;
283283
284- sentryBuildPluginManager
285- . createRelease ( )
286- . then ( async ( ) => {
284+ const run = async ( ) : Promise < void > => {
285+ try {
286+ await sentryBuildPluginManager . createRelease ( ) ;
287287 if ( sourcemapsEnabled && options . sourcemaps ?. disable !== "disable-upload" ) {
288288 const outputPath = compilation . outputOptions . path ?? path . resolve ( ) ;
289289 const buildArtifacts = Object . keys ( compilation . assets ) . map ( ( asset ) =>
290290 path . join ( outputPath , asset )
291291 ) ;
292292 await upload ( buildArtifacts ) ;
293293 }
294- } )
295- . finally ( async ( ) => {
294+ } finally {
296295 freeGlobalDependencyOnBuildArtifacts ( ) ;
297296 await sentryBuildPluginManager . deleteArtifacts ( ) ;
298- } )
299- . then (
300- ( ) => callback ( ) ,
301- ( err : Error ) => callback ( err )
302- ) ;
297+ }
298+ } ;
299+
300+ run ( ) . then (
301+ ( ) => callback ( ) ,
302+ ( err : Error ) => callback ( err )
303+ ) ;
303304 }
304305 ) ;
305306
You can’t perform that action at this time.
0 commit comments