Skip to content

Commit

Permalink
Validate on all pod commands that the user is using a terminal in utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkalpin committed Nov 10, 2013
1 parent 525180c commit c9e08db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/pod
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env ruby

if RUBY_VERSION > '1.8.7' && Encoding.default_external != Encoding::UTF_8
raise Informative 'CocoaPods requires your terminal to be using UTF-8 encoding'
end

if $0 == __FILE__ && !ENV['COCOAPODS_NO_BUNDLER']
ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
require "rubygems"
Expand All @@ -10,7 +14,7 @@ elsif ENV['COCOAPODS_NO_BUNDLER']
gem "cocoapods"
end

if (ENV['CP_STDOUT_SYNC'] == 'TRUE')
if ENV['CP_STDOUT_SYNC'] == 'TRUE'
STDOUT.sync = true
end

Expand Down

0 comments on commit c9e08db

Please sign in to comment.