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 {
15
15
appdir : Option < PathBuf > ,
16
16
17
17
#[ arg( long, env = "GLIBC_VERSION" ) ]
18
- glibc_version : String ,
18
+ glibc_version : Option < String > ,
19
19
20
20
#[ arg( long, default_value_t = false ) ]
21
21
plugin_type : bool ,
@@ -130,11 +130,18 @@ fn main() {
130
130
let libs_path = appdir. join ( "usr/lib/*" ) ;
131
131
let bins_path = appdir. join ( "usr/lib/*" ) ;
132
132
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
+
133
140
info ! ( "Processing libs" ) ;
134
141
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 ( ) ) ;
136
143
137
144
info ! ( "Processing bins" ) ;
138
145
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 ( ) ) ;
140
147
}
You can’t perform that action at this time.
0 commit comments