@@ -178,7 +178,7 @@ def main(args=None, logfile=None, do_build=None, testing=False):
178178
179179 # initialise logging for main
180180 global _log
181- _log , logfile = init_logging (logfile , logtostdout = options .logtostdout , silent = testing or options .last_log )
181+ _log , logfile = init_logging (logfile , logtostdout = options .logtostdout , silent = testing or options .terse )
182182
183183 # disallow running EasyBuild as root
184184 if os .getuid () == 0 :
@@ -223,22 +223,13 @@ def main(args=None, logfile=None, do_build=None, testing=False):
223223 # print location to last log file, and exit
224224 last_log = find_last_log (logfile ) or '(none)'
225225 print_msg (last_log , log = _log , prefix = False )
226- cleanup (logfile , eb_tmpdir , testing , silent = True )
227- sys .exit (0 )
228226
229227 # check whether packaging is supported when it's being used
230228 if options .package :
231229 check_pkg_support ()
232230 else :
233231 _log .debug ("Packaging not enabled, so not checking for packaging support." )
234232
235- # update session state
236- eb_config = eb_go .generate_cmd_line (add_default = True )
237- modlist = session_module_list (testing = testing ) # build options must be initialized first before 'module list' works
238- init_session_state .update ({'easybuild_configuration' : eb_config })
239- init_session_state .update ({'module_list' : modlist })
240- _log .debug ("Initial session state: %s" % init_session_state )
241-
242233 # GitHub integration
243234 if options .review_pr or options .new_pr or options .update_pr :
244235 if options .review_pr :
@@ -254,18 +245,31 @@ def main(args=None, logfile=None, do_build=None, testing=False):
254245 sys .exit (0 )
255246
256247 # search for easyconfigs, if a query is specified
257- query = options .search or options .search_short
248+ query = options .search or options .search_filename or options . search_short
258249 if query :
259- search_easyconfigs (query , short = not options .search )
250+ search_easyconfigs (query , short = options .search_short , filename_only = options .search_filename ,
251+ terse = options .terse )
252+
253+ # non-verbose cleanup and exit after printing terse info
254+ if options .terse :
255+ cleanup (logfile , eb_tmpdir , testing , silent = True )
256+ sys .exit (0 )
257+
258+ # update session state
259+ eb_config = eb_go .generate_cmd_line (add_default = True )
260+ modlist = session_module_list (testing = testing ) # build options must be initialized first before 'module list' works
261+ init_session_state .update ({'easybuild_configuration' : eb_config })
262+ init_session_state .update ({'module_list' : modlist })
263+ _log .debug ("Initial session state: %s" % init_session_state )
260264
261265 # determine easybuild-easyconfigs package install path
262266 easyconfigs_pkg_paths = get_paths_for (subdir = EASYCONFIGS_PKG_SUBDIR )
263267 if not easyconfigs_pkg_paths :
264268 _log .warning ("Failed to determine install path for easybuild-easyconfigs package." )
265269
266270 # command line options that do not require any easyconfigs to be specified
267- no_ec_opts = [options .aggregate_regtest , options .new_pr , options .review_pr , options .search , options . search_short ,
268- options .regtest , options .update_pr ]
271+ no_ec_opts = [options .aggregate_regtest , options .new_pr , options .review_pr , options .search ,
272+ options .search_filename , options . search_short , options . regtest , options .update_pr ]
269273
270274 # determine paths to easyconfigs
271275 paths = det_easyconfig_paths (orig_paths )
0 commit comments