From 0e17543082952df84fe08abdb1d29aa05683bb4c Mon Sep 17 00:00:00 2001 From: Mark Rada Date: Wed, 20 Jul 2011 23:46:31 -0400 Subject: [PATCH] Quote path given to otool during deployment --- bin/ruby_deploy | 2 +- spec/macruby/command_line/ruby_deploy_spec.rb | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bin/ruby_deploy b/bin/ruby_deploy index 654229dfc..455ebe5bb 100644 --- a/bin/ruby_deploy +++ b/bin/ruby_deploy @@ -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? diff --git a/spec/macruby/command_line/ruby_deploy_spec.rb b/spec/macruby/command_line/ruby_deploy_spec.rb index 2b4cfcb8d..3f900441d 100644 --- a/spec/macruby/command_line/ruby_deploy_spec.rb +++ b/spec/macruby/command_line/ruby_deploy_spec.rb @@ -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