Skip to content

Commit d48969b

Browse files
author
Andrija Kolic
committed
Print a warning if an arg containing space character(s) is parsed with mx_sdk_benchmark.parse_prefixed_args
1 parent ad42202 commit d48969b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sdk/mx.sdk/mx_sdk_benchmark.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,11 @@ def parse_prefixed_args(prefix, args):
18621862
ret = []
18631863
for arg in args:
18641864
if arg.startswith(prefix):
1865-
parsed = arg.split(' ')[0].split(prefix)[1]
1865+
words_in_arg = arg.split(' ')
1866+
if len(words_in_arg) > 1:
1867+
# We will monitor our logs for this warning and then fix this method once we are certain no jobs break (GR-60134)
1868+
mx.warn(f"A prefixed arg that includes spaces is being parsed, ignoring everything that comes after the first space! The arg in question is: '{arg}'")
1869+
parsed = words_in_arg[0].split(prefix)[1]
18661870
if parsed not in ret:
18671871
ret.append(parsed)
18681872
return ret

0 commit comments

Comments
 (0)