Skip to content

Commit

Permalink
skip copy to clipboard when value is nil.
Browse files Browse the repository at this point in the history
  • Loading branch information
dx7 committed Mar 8, 2013
1 parent f03ffaf commit cc6e97c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/bitly
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ class App
protected

def copy_to_clipboard(value)
system "printf '#{value.strip}' 2> /dev/null | pbcopy 2> /dev/null" if RUBY_PLATFORM[/darwin/]
unless value.nil?
system "printf '#{value.strip}' 2> /dev/null | pbcopy 2> /dev/null" if RUBY_PLATFORM[/darwin/]
end
end

def load_account_data
Expand Down

0 comments on commit cc6e97c

Please sign in to comment.