From a0db741108000dcaba1112bdddc47e553015c822 Mon Sep 17 00:00:00 2001 From: Robbert Klarenbeek Date: Mon, 21 Apr 2014 00:25:50 +0200 Subject: [PATCH] Fix compatibility with FreeBSD tar --- CHANGELOG.md | 3 +++ lib/capistrano/git.rb | 2 +- spec/lib/capistrano/git_spec.rb | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 362eeb03..22730bf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ Reverse Chronological Order: https://github.com/capistrano/capistrano/compare/v3.2.1...HEAD +* Bug Fixes: + * Fixed compatibility with FreeBSD tar (@robbertkl) + * Minor Changes * Added tests for after/before hooks features (@juanibiapina, @miry) diff --git a/lib/capistrano/git.rb b/lib/capistrano/git.rb index 619e2aa9..93b2297f 100644 --- a/lib/capistrano/git.rb +++ b/lib/capistrano/git.rb @@ -30,7 +30,7 @@ class Capistrano::Git < Capistrano::SCM end def release - git :archive, fetch(:branch), '| tar -x -C', release_path + git :archive, fetch(:branch), '| tar -x -f - -C', release_path end def fetch_revision diff --git a/spec/lib/capistrano/git_spec.rb b/spec/lib/capistrano/git_spec.rb index c3b868bf..a474ad4b 100644 --- a/spec/lib/capistrano/git_spec.rb +++ b/spec/lib/capistrano/git_spec.rb @@ -61,7 +61,7 @@ module Capistrano context.expects(:fetch).returns(:branch) context.expects(:release_path).returns(:path) - context.expects(:execute).with(:git, :archive, :branch, '| tar -x -C', :path) + context.expects(:execute).with(:git, :archive, :branch, '| tar -x -f - -C', :path) subject.release end