Permalink
Browse files

gnutar was renamed to gtar? I don't know. This fixes it.

  • Loading branch information...
1 parent 9e8b20f commit 80ee8ae233ee58fe1a39c47fdb34af6b37f9f8dd @jordansissel committed Dec 20, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/fpm/util.rb
View
@@ -117,7 +117,11 @@ def tar_cmd
when "SunOS"
return "gtar"
when "Darwin"
- return "gnutar"
+ # Try running gnutar, it was renamed(??) in homebrew to 'gtar' at some point, I guess? I don't know.
+ ["gnutar", "gtar"].each do |tar|
+ system("#{tar} > /dev/null 2> /dev/null")
+ return tar unless $?.exitstatus == 127
+ end
else
return "tar"
end

0 comments on commit 80ee8ae

Please sign in to comment.