Skip to content

Commit

Permalink
Quote path given to otool during deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrous26 committed Jul 21, 2011
1 parent 192e02d commit 0e17543
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/ruby_deploy
Expand Up @@ -281,7 +281,7 @@ class Deployer
def check_linked_bundles
dirs = [%r{^/opt}, %r{^/usr/local/lib}, %r{^/Users}, %r{^/Library}]
Dir.glob(File.join(app_macruby, '**', '*.bundle')).each do |bundle|
libs = execute("/usr/bin/otool -L #{bundle}").split("\n").map(&:strip)
libs = execute("/usr/bin/otool -L \"#{bundle}\"").split("\n").map(&:strip)
libs[1..-1].each do |lib|
bad_libs = dirs.map { |dir| lib.match(dir) ? lib : nil }.compact
next if bad_libs.empty?
Expand Down
11 changes: 11 additions & 0 deletions spec/macruby/command_line/ruby_deploy_spec.rb
Expand Up @@ -87,6 +87,17 @@ def framework_stdlib
mkdir_p @app_bundle
deploy('--compile').should include("doesn't seem to be a valid application bundle")
end

it 'does not fail if the app name contains spaces' do
mkdir_p @dir
@app_bundle = File.join(@dir, 'Dummy App.app')
cp_r File.join(FIXTURES, 'dummy_app'), @app_bundle
mkdir File.join(@app_bundle, 'Contents/MacOS')
cp File.join(SOURCE_ROOT, 'lib/irb.rbo'), File.join(@app_bundle, 'Contents/MacOS/Dummy App')
deploy('--embed --stdlib bigdecimal')
$?.success?.should == true
end

end

describe "ruby_deploy command line options:" do
Expand Down

0 comments on commit 0e17543

Please sign in to comment.