aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorilovezfs2016-04-30 14:33:16 -0700
committerMike McQuaid2016-04-30 16:33:16 -0500
commitf54f27d6211de1b905ffaf88cd03e8f4fa7aad6d (patch)
tree5a5ed4f00c9d32bd52611e9751232ec5e8884925
parentc63400d56baaa36f111c2e2d7e709c9ea7b8b992 (diff)
downloadbrew-f54f27d6211de1b905ffaf88cd03e8f4fa7aad6d.tar.bz2
Skip tmux warning if reattached to user namespace
The exit status of pbpaste is a proxy for whether the user has set up reattach-to-user-namespace. It should be 0 if it is set up, 1 otherwise. This is the same hack as Homebrew/homebrew-services#48.
-rw-r--r--Library/Homebrew/caveats.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb
index 6e02b168d..350e2d57b 100644
--- a/Library/Homebrew/caveats.rb
+++ b/Library/Homebrew/caveats.rb
@@ -196,7 +196,9 @@ class Caveats
s << " #{f.plist_manual}"
end
- s << "" << "WARNING: brew services will fail when run under tmux." if ENV["TMUX"]
+ if ENV["TMUX"] && !quiet_system("/usr/bin/pbpaste")
+ s << "" << "WARNING: brew services will fail when run under tmux."
+ end
end
s.join("\n") + "\n" unless s.empty?
end