wangyu5 / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

build_file_dir may be None in input.py ExpandVariables #223

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run GYP on a file without a specified path component and a python actions 
block.

What is the expected output? What do you see instead?
GYP should run successfully. Instead, ExpandVariables fails with the following 
error:

  File "C:\svn\chromium\src\tools\gyp\pylib\gyp\input.py", line 671, in ExpandVariables
    os.chdir(build_file_dir)
TypeError: chdir() argument 1 must be string, not None while trying to load 
test.gyp

What version of the product are you using? On what operating system?
GYP revision 1051 both Windows and Mac.

Please provide any additional information below.
The problem is that 'build_file_dir' is empty. The fix is to check that 
build_file_dir is not None before calling os.chdir() on line 671 in input.py. 
Patch attached.

Original issue reported on code.google.com by marshall@chromium.org on 29 Sep 2011 at 1:29

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was fixed in revision 1602.

Original comment by magreenb...@gmail.com on 1 Apr 2013 at 7:15