display the workaround for tmux users

if use tmux, we need some operation to launch iOS simulator.
This commit is contained in:
Watson
2013-06-08 01:25:22 +09:00
parent 495828a495
commit abd0150df4

View File

@@ -54,6 +54,21 @@ task :simulator => ['build:simulator'] do
app = App.config.app_bundle('iPhoneSimulator')
target = ENV['target'] || App.config.sdk_version
if ENV['TMUX']
tmux_default_command = `tmux show-options -g default-command`.strip
unless tmux_default_command.include?("reattach-to-user-namespace")
App.warn(<<END
It appears you are using tmux without 'reattach-to-user-namespace', the simulator might not work properly. You can either disable tmux or run the following commands:
$ brew install reattach-to-user-namespace
$ echo 'set-option -g default-command "reattach-to-user-namespace -l $SHELL"' >> ~/.tmux.conf
END
)
end
end
# Cleanup the simulator application sandbox, to avoid having old resource files there.
if ENV['clean']
sim_apps = File.expand_path("~/Library/Application Support/iPhone Simulator/#{target}/Applications")