• 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
Trouble running ruby code in Run Script build phase
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble running ruby code in Run Script build phase


  • Subject: Trouble running ruby code in Run Script build phase
  • From: Abizer Nasir <email@hidden>
  • Date: Wed, 13 Aug 2008 23:00:38 +0100

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


  • Follow-Ups:
    • Re: Trouble running ruby code in Run Script build phase
      • From: Tommy Nordgren <email@hidden>
    • Re: Trouble running ruby code in Run Script build phase
      • From: Paul Walmsley <email@hidden>
    • Re: Trouble running ruby code in Run Script build phase
      • From: Waqar Malik <email@hidden>
  • Prev by Date: Re: build script access
  • Next by Date: Re: Trouble running ruby code in Run Script build phase
  • Previous by thread: Re: downloading documentation failing, Xcode quits.
  • Next by thread: Re: Trouble running ruby code in Run Script build phase
  • Index(es):
    • Date
    • Thread