2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-25 03:09:30 +01:00

Fix Context.launch_dir init to point on user working directory

This commit is contained in:
Adriano Scoditti 2017-08-18 10:12:22 +02:00 committed by ita1024
parent 0520af4efb
commit 5f5f8eede5

View File

@ -38,6 +38,10 @@ def waf_entry_point(current_directory, version, wafdir):
ctx.parse_args()
sys.exit(0)
# Store current directory before any chdir
Context.waf_dir = wafdir
Context.launch_dir = current_directory
if len(sys.argv) > 1:
# os.path.join handles absolute paths in sys.argv[1] accordingly (it discards the previous ones)
# if sys.argv[1] is not an absolute path, then it is relative to the current working directory
@ -50,9 +54,6 @@ def waf_entry_point(current_directory, version, wafdir):
current_directory = os.path.normpath(os.path.dirname(potential_wscript))
sys.argv.pop(1)
Context.waf_dir = wafdir
Context.launch_dir = current_directory
# if 'configure' is in the commands, do not search any further
no_climb = os.environ.get('NOCLIMB')
if not no_climb: