Permalink
Browse files

Improve OS X codesign information on failure

  • Loading branch information...
1 parent dd4f6f5 commit 9215bc34a393c65a10e9f6e8c01d3ec4cae707b0 @rys rys committed Mar 23, 2013
Showing with 7 additions and 5 deletions.
  1. +7 −5 hooks/after_install_codesign
@@ -13,9 +13,15 @@
# Require 10.7 - FIXME: Should be 10.7 or newer.
[[ "$(/usr/bin/sw_vers -productVersion)" == 10.7* ]] || return 2
+ # Find out ruby executable to sign
+ typeset _ruby_name
+ _ruby_name="$(sed -n '/^ruby_install_name=/ {s/ruby_install_name="\(.*\)"/\1/; p; };' "$MY_RUBY_HOME/config" )"
+
# Require rvm_codesign_identity
[[ -n "${rvm_codesign_identity:-}" ]] || {
- rvm_warn "'rvm_codesign_identity' is not set, please set it in ~/.rvmrc"
+ rvm_warn "'rvm_codesign_identity' is not set so RVM can't sign ${_ruby_name}\n" \
+ "Set it in ~/.rvmrc after reading the following about OS X code signing:\n" \
+ "https://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html"
return 3
}
@@ -25,10 +31,6 @@
return 4
}
- # Find out ruby executable to sign
- typeset _ruby_name
- _ruby_name="$(sed -n '/^ruby_install_name=/ {s/ruby_install_name="\(.*\)"/\1/; p; };' "$MY_RUBY_HOME/config" )"
-
# Sign ruby
/usr/bin/codesign -f -s "${rvm_codesign_identity}" "$(which "${_ruby_name}")"
)

0 comments on commit 9215bc3

Please sign in to comment.