Skip to content

Commit 15fe9c1

Browse files
authored
Fix local_archive strategy so it doesn't use the remote path to git (#4212)
1 parent fe5a985 commit 15fe9c1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

recipe/deploy/update_code.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,23 @@
7373
task('deploy:update_code', function () {
7474
$strategy = get('update_code_strategy');
7575
$target = get('target');
76-
$git = get('bin/git');
7776

7877
$targetWithDir = $target;
7978
if (!empty(get('sub_directory'))) {
8079
$targetWithDir .= ':{{sub_directory}}';
8180
}
8281

8382
if ($strategy === 'local_archive') {
84-
$gitRoot = runLocally("$git rev-parse --show-toplevel");
85-
runLocally("$git -C " . quote($gitRoot) . " archive $targetWithDir -o archive.tar");
83+
$gitRoot = runLocally("git rev-parse --show-toplevel");
84+
runLocally("git -C " . quote($gitRoot) . " archive $targetWithDir -o archive.tar");
8685
upload("$gitRoot/archive.tar", '{{release_path}}/archive.tar');
8786
run("tar -xf {{release_path}}/archive.tar -C {{release_path}}");
8887
run("rm {{release_path}}/archive.tar");
8988
unlink("$gitRoot/archive.tar");
9089

9190
$rev = quote(runLocally("git rev-list $target -1"));
9291
} else {
92+
$git = get('bin/git');
9393
$repository = get('repository');
9494

9595
if (empty($repository)) {

0 commit comments

Comments
 (0)