avoid the exception on --help on win32

This commit is contained in:
Thomas Nagy 2011-11-28 19:19:25 +01:00
parent c00a364048
commit c798bbe74f
1 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,7 @@ def waf_entry_point(current_directory, version, wafdir):
sys.exit(1)
if '--version' in sys.argv:
Context.run_dir = current_directory
ctx = Context.create_context('options')
ctx.curdir = current_directory
ctx.parse_args()
@ -102,6 +103,7 @@ def waf_entry_point(current_directory, version, wafdir):
if not Context.run_dir:
if '-h' in sys.argv or '--help' in sys.argv:
Logs.warn('No wscript file found: the help message may be incomplete')
Context.run_dir = current_directory
ctx = Context.create_context('options')
ctx.curdir = current_directory
ctx.parse_args()