aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/servo/build_commands.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index 5b4e46f9e8a..5d5da3298fe 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -55,8 +55,15 @@ def notify(elapsed):
print("[Warning] Could not generate notification! Please make sure that the required libraries are installed!")
elif sys.platform.startswith('darwin'):
- # Notification code for Darwin here! For the time being printing simple msg
- print("[Warning] : Darwin System! Notifications not supported currently!")
+ try:
+ from distutils.spawn import find_executable
+ notifier = find_executable('terminal-notifier')
+ if not notifier:
+ raise Exception('`terminal-notifier` not found')
+ subprocess.call([notifier, '-title', 'Servo Build System',
+ '-group', 'servobuild', '-message', 'Servo build complete!'])
+ except:
+ print("[Warning] Could not generate notification! Make sure that `terminal-notifier is installed!")
@CommandProvider