Skip to content

Commit

Permalink
Don't print traceback when options are invalid
Browse files Browse the repository at this point in the history
Currently passing a bad combo or array option, providing a non-boolean
to a bool arg, or a host of other things can cause an traceback from a
MesonException, don't do that.
  • Loading branch information
dcbaker committed Oct 25, 2017
1 parent c178a57 commit ddc2a1a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mesonbuild/mesonmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,12 @@ def run(args, mainfile=None):
elif cmd_name == 'rewrite':
return rewriter.run(remaining_args)
elif cmd_name == 'configure':
return mconf.run(remaining_args)
try:
return mconf.run(remaining_args)
except MesonException as e:
mlog.log(mlog.red('\nError configuring project:'))
mlog.log(e)
sys.exit(1)
elif cmd_name == 'wrap':
return wraptool.run(remaining_args)

Expand Down

0 comments on commit ddc2a1a

Please sign in to comment.