• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trouble running ruby code in Run Script build phase
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Trouble running ruby code in Run Script build phase (From: Abizer Nasir <email@hidden>)

  • Prev by Date: Trouble running ruby code in Run Script build phase
  • Next by Date: Re: build script access
  • Previous by thread: Trouble running ruby code in Run Script build phase
  • Next by thread: Re: Trouble running ruby code in Run Script build phase
  • Index(es):
    • Date
    • Thread