File tree 4 files changed +22
-2
lines changed
4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -510,6 +510,8 @@ fn build_artifact_bundle(
510
510
bundle. set_attribute ( "dist" . to_owned ( ) , dist. to_owned ( ) ) ;
511
511
}
512
512
513
+ let mut bundle_file_count = 0 ;
514
+
513
515
for file in files. values ( ) {
514
516
pb. inc ( 1 ) ;
515
517
pb. set_message ( & file. url ) ;
@@ -533,6 +535,7 @@ fn build_artifact_bundle(
533
535
return Err ( e. into ( ) ) ;
534
536
}
535
537
}
538
+ bundle_file_count += 1 ;
536
539
}
537
540
538
541
bundle. finish ( ) ?;
@@ -542,8 +545,8 @@ fn build_artifact_bundle(
542
545
println ! (
543
546
"{} Bundled {} {} for upload" ,
544
547
style( ">" ) . dim( ) ,
545
- style( files . len ( ) ) . yellow( ) ,
546
- match files . len ( ) {
548
+ style( bundle_file_count ) . yellow( ) ,
549
+ match bundle_file_count {
547
550
1 => "file" ,
548
551
_ => "files" ,
549
552
}
Original file line number Diff line number Diff line change
1
+ ```
2
+ $ sentry-cli sourcemaps upload tests/integration/_fixtures/invalid-utf8.txt tests/integration/_fixtures/bundle.min.js.map
3
+ ? success
4
+ ...
5
+ > Bundled 1 file for upload
6
+ ...
7
+
8
+ ```
Original file line number Diff line number Diff line change
1
+ ��
Original file line number Diff line number Diff line change @@ -183,3 +183,11 @@ fn command_sourcemaps_upload_complex_extension() {
183
183
. register_trycmd_test ( "sourcemaps/sourcemaps-upload-complex-extension.trycmd" )
184
184
. with_default_token ( ) ;
185
185
}
186
+
187
+ #[ test]
188
+ fn command_sourcemaps_upload_skip_invalid_utf8 ( ) {
189
+ TestManager :: new ( )
190
+ . mock_common_upload_endpoints ( ServerBehavior :: Modern , Default :: default ( ) )
191
+ . register_trycmd_test ( "sourcemaps/sourcemaps-with-invalid-utf8.trycmd" )
192
+ . with_default_token ( ) ;
193
+ }
You can’t perform that action at this time.
0 commit comments