Xcode pre and post action scripts passed essentially no environment variables

Number:rdar://9194286 Date Originated:27-Mar-2011 06:51 PM
Status:Open Resolved:
Product:Xcode Product Version:Xcode 4.0.1
Classification:Serious Reproducible:Always

When configuring pre-action or post-action scripts in Xcode to run as part of a build scheme, it is reasonable to expect that they should get passed the values of the various Xcode build variables in their environment.

Without knowing which project is being built, and where it is being built to, there is a very limited amount that such a script can do. 

Steps to Reproduce:

Add a pre-action or post-action script with the following text:

    set > environment.txt
    open environment.txt

Expected Results:

The environment.txt file should be filled in with all environment variable values, and then should open in the default text editor.

I would expect that the environment would include many xcode variables, such as BUILD_DIR, PROJECT_DIR and so on.

Actual Results:

Very few Xcode specific variables are defined.  WORKSPACE_PATH and SCHEME_NAME are defined for pre-actions, but not post-actions.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!