Re: Trouble running ruby code in Run Script build phase
Re: Trouble running ruby code in Run Script build phase
- Subject: Re: Trouble running ruby code in Run Script build phase
- From: Tommy Nordgren <email@hidden>
- Date: Thu, 14 Aug 2008 00:36:14 +0200
On 14 aug 2008, at 00.00, Abizer Nasir wrote:
I've got the following ruby code which works fine when run as a
script, but doesn't run correctly when run as a script in an Xcode
buld phase:
I've got the shell correctly pointing to /usr/bin/ruby
sha = `/usr/local/git/bin/git rev-parse --short HEAD`.chomp
puts sha
# This works fine
output = `which git`
puts output
# THIS RESULTS IN A nil
info_file = ENV['BUILT_PRODUCTS_DIR'] + "/" + ENV['INFOPLIST_PATH']
puts info_file
# This works fine.
.
The /usr/local/git/bin directory is not in the PATH when launched
from Xcode.
You can however provide bindings for environment variables used by
Apps started from finder in the file:
~/.MacOSX/environment.plist
----------------------------------
Skinheads are so tired of immigration, that they are going to move to
a country that don't accept immigrants!
Tommy Nordgren
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden