Skip to content

Commit

Permalink
add check if chown is available
Browse files Browse the repository at this point in the history
  • Loading branch information
gaambo committed Jul 10, 2023
1 parent 7e8ee1e commit bfe5803
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion recipes/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/set.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -162,3 +162,5 @@
set('release_name', function () {
return date('YmdHis'); // you could also use the composer.json version here
});

set('writable_mode', 'chown');

0 comments on commit bfe5803

Please sign in to comment.