# HG changeset patch # User Gilles Duboscq # Date 1368454189 -7200 # Node ID 1ef7b26e9177d1db669b392a23c58e3dcd79de92 # Parent a886c764ea59476355c638e3c4b56d61aeb8a4b0 mx/commands.py: warn about arguments after '-version' when launching the vm diff -r a886c764ea59 -r 1ef7b26e9177 mx/commands.py --- a/mx/commands.py Mon May 13 17:11:45 2013 +0200 +++ b/mx/commands.py Mon May 13 16:09:49 2013 +0200 @@ -763,6 +763,12 @@ exe = join(jdk, 'bin', mx.exe_suffix('java')) dbg = _native_dbg.split() if _native_dbg is not None else [] + + if '-version' in args: + ignoredArgs = args[args.index('-version')+1:] + if len(ignoredArgs) > 0: + mx.log("Warning: The following options will be ignored by the vm because they come after the '-version' argument: " + ' '.join(ignoredArgs)) + return mx.run(dbg + [exe, '-' + vm] + args, nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd, timeout=timeout) def _find_classes_with_annotations(p, pkgRoot, annotations, includeInnerClasses=False):