diff --git a/recipes/common.php b/recipes/common.php index 1704538..31c848d 100644 --- a/recipes/common.php +++ b/recipes/common.php @@ -105,7 +105,7 @@ * Does not support writable_mode configuration - always uses this */ task('deploy:writable', function () { - if (has('http_user')) { + if (has('http_user') && get('writable_mode') === 'chown') { run("cd {{release_or_current_path}} && chown -R {{http_user}} ."); } // set all directories to 755 diff --git a/src/set.php b/src/set.php index d8ab1fe..e295e11 100644 --- a/src/set.php +++ b/src/set.php @@ -8,7 +8,7 @@ namespace Deployer; use function Gaambo\DeployerWordpress\Utils\Composer\installComposer; -use function \Gaambo\DeployerWordpress\Utils\WPCLI\installWPCLI; +use function Gaambo\DeployerWordpress\Utils\WPCLI\installWPCLI; require_once 'utils/wp-cli.php'; @@ -162,3 +162,5 @@ set('release_name', function () { return date('YmdHis'); // you could also use the composer.json version here }); + +set('writable_mode', 'chown');