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: Waqar Malik <email@hidden>
- Date: Wed, 13 Aug 2008 17:07:36 -0500
/usr/bin/env git
--Waqar
On Aug 13, 2008, at 5:00 PM, 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.
.
.
.
This is only part of the script, I would like it to be agnostic
about the location of git on a computer, but I can't run 'which'
from within Xcode.
This is very frustrating. Am I missing something? I can work around
this, but it would be inelegant.
Thanks.
Abizer.
_______________________________________________
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