Commit a339f97e authored by Samuel Giddins's avatar Samuel Giddins

Merge pull request #5199 from CocoaPods/kapin/ansi-colors

Make the utf-8 warning message respect --no-ansi
parents 242da6b5 8db59560
...@@ -15,7 +15,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -15,7 +15,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes ##### Bug Fixes
* None. * The warning for not having utf-8 set as the default encoding for a
terminal now properly respects the `--no-ansi` argument.
[Joshua Kalpin](https://github.com/Kapin)
[#5199](https://github.com/CocoaPods/CocoaPods/pull/5199)
## 1.0.0.beta.8 (2016-04-15) ## 1.0.0.beta.8 (2016-04-15)
......
#!/usr/bin/env ruby #!/usr/bin/env ruby
if Encoding.default_external != Encoding::UTF_8 if Encoding.default_external != Encoding::UTF_8
STDERR.puts <<-DOC
\e[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8 if ARGV.include? '--no-ansi'
\e[0m STDERR.puts <<-DOC
DOC WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
DOC
else
STDERR.puts <<-DOC
\e[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
\e[0m
DOC
end
end end
if $PROGRAM_NAME == __FILE__ && !ENV['COCOAPODS_NO_BUNDLER'] if $PROGRAM_NAME == __FILE__ && !ENV['COCOAPODS_NO_BUNDLER']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment