File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ struct Args {
1515 appdir : Option < PathBuf > ,
1616
1717 #[ arg( long, env = "GLIBC_VERSION" ) ]
18- glibc_version : String ,
18+ glibc_version : Option < String > ,
1919
2020 #[ arg( long, default_value_t = false ) ]
2121 plugin_type : bool ,
@@ -130,11 +130,18 @@ fn main() {
130130 let libs_path = appdir. join ( "usr/lib/*" ) ;
131131 let bins_path = appdir. join ( "usr/lib/*" ) ;
132132
133+ if !args. glibc_version . is_some ( ) {
134+ error ! ( "glibc version not specified" ) ;
135+ exit ( 1 ) ;
136+ }
137+
138+ let glibc_version = args. glibc_version . unwrap ( ) ;
139+
133140 info ! ( "Processing libs" ) ;
134141 let libs = glob_files ( libs_path. to_str ( ) . unwrap ( ) ) . unwrap ( ) ;
135- process ( libs, args . glibc_version . as_str ( ) ) ;
142+ process ( libs, glibc_version. as_str ( ) ) ;
136143
137144 info ! ( "Processing bins" ) ;
138145 let bins = glob_files ( bins_path. to_str ( ) . unwrap ( ) ) . unwrap ( ) ;
139- process ( bins, args . glibc_version . as_str ( ) ) ;
146+ process ( bins, glibc_version. as_str ( ) ) ;
140147}
You can’t perform that action at this time.
0 commit comments