mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-15 02:29:17 +08:00
display the workaround for tmux users
if use tmux, we need some operation to launch iOS simulator.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user