Skip to content
Browse files

Strip new line from running apps

Prevents AppleScript error if Rdio was launched last
  • Loading branch information...
1 parent 517508e commit 808bf68b3a23056f0f96f262e6233315c2d50818 @pengwynn committed Mar 23, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rdio/desktop_bridge.rb
View
2 lib/rdio/desktop_bridge.rb
@@ -11,7 +11,7 @@ def tell_rdio(cmd)
def app_name
running_apps = apple_script 'tell application "System Events" to get the name of every process whose background only is false'
- running_apps.split(', ').grep(/Rdio/)[0] || 'Rdio'
+ running_apps.split(', ').grep(/Rdio/)[0].to_s.strip || 'Rdio'
end
def quit

0 comments on commit 808bf68

Please sign in to comment.
Something went wrong with that request. Please try again.