File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 11use std:: borrow:: Cow ;
2- use std:: io:: Write ;
3- use std:: path:: Path ;
42#[ cfg( not( windows) ) ]
53use std:: fs;
4+ use std:: io:: Write ;
65#[ cfg( not( windows) ) ]
76use std:: os:: unix:: fs:: PermissionsExt ;
7+ use std:: path:: Path ;
88
99use anyhow:: { anyhow, bail, Context as _, Result } ;
1010use clap:: { Arg , ArgAction , ArgMatches , Command } ;
@@ -256,9 +256,14 @@ fn normalize_directory(path: &Path) -> Result<TempFile> {
256256 . filter ( |entry| entry. path ( ) . is_file ( ) )
257257 . map ( |entry| {
258258 let entry_path = entry. into_path ( ) ;
259- let relative_path = entry_path. strip_prefix (
260- path. parent ( ) . ok_or_else ( || anyhow ! ( "Cannot determine parent directory for path: {}" , path. display( ) ) ) ?
261- ) ?. to_owned ( ) ;
259+ let relative_path = entry_path
260+ . strip_prefix ( path. parent ( ) . ok_or_else ( || {
261+ anyhow ! (
262+ "Cannot determine parent directory for path: {}" ,
263+ path. display( )
264+ )
265+ } ) ?) ?
266+ . to_owned ( ) ;
262267 Ok ( ( entry_path, relative_path) )
263268 } )
264269 . collect :: < Result < Vec < _ > > > ( ) ?
Original file line number Diff line number Diff line change @@ -119,9 +119,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
119119
120120 if let Some ( version) = version {
121121 for dist in matches. get_many :: < String > ( "dist" ) . unwrap ( ) {
122- println ! (
123- "Uploading sourcemaps for release {version} distribution {dist}"
124- ) ;
122+ println ! ( "Uploading sourcemaps for release {version} distribution {dist}" ) ;
125123
126124 processor. upload ( & UploadContext {
127125 org : & org,
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ This command will validate input parameters and attempt to send a metric to \
3838 Sentry. Due to network errors and rate limits, the metric is not guaranteed to \
3939 arrive. Check the debug output for transmission errors by passing --log-level=\
4040 debug or setting `SENTRY_LOG_LEVEL=debug`.") ) ]
41- #[ command( hide= true ) ]
41+ #[ command( hide = true ) ]
4242enum SendMetricSubcommand {
4343 #[ command( about = format!( "[DEPRECATED] {INCREMENT_ABOUT}" ) ) ]
4444 #[ command( long_about = format!( "{DEPRECATION_MESSAGE}{{n}}{{n}}{INCREMENT_ABOUT}" ) ) ]
You can’t perform that action at this time.
0 commit comments