Skip to content

Commit acea5b4

Browse files
committed
script: fix "mb" now modulecmd.tcl may exit with non-zero code
1 parent fba276e commit acea5b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

script/mb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env tclsh
22
#
33
# MB, make bench between modulecmd versions
4-
# Copyright (C) 2019-2022 Xavier Delaruelle
4+
# Copyright (C) 2019-2024 Xavier Delaruelle
55
#
66
# This program is free software: you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by
@@ -55,8 +55,8 @@ set curdir [pwd]
5555

5656
# time test run for a given modulecmd version
5757
proc bench {tag args} {
58-
return [expr {round([lindex [split [time {eval exec ./modulecmd.$tag sh\
59-
$args >>& /dev/null} $::benchrep]] 0] / 1000)}]
58+
return [expr {round([lindex [split [time {catch {exec ./modulecmd.$tag sh\
59+
{*}$args >>& /dev/null}} $::benchrep]] 0] / 1000)}]
6060
}
6161

6262
# profile given modulecmd version test run

0 commit comments

Comments
 (0)