Skip to content

Commit 231ca06

Browse files
committed
feat: Add warning message for fix-permissions command
1 parent b2296f0 commit 231ca06

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SubCommands/FixFileAndDirPermissions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ public function output() : bool {
2424
return false;
2525
}
2626

27+
\WP_CLI::confirm( 'This command will change file and folder permissions inside your WordPress installation which might affect the way it works. Are you sure that you want to do this?' );
28+
2729
$iterator = new \RecursiveDirectoryIterator(ABSPATH);
2830
foreach($iterator as $file) {
2931
chmod($file, is_file($file) ? $this->filePermissions : $this->directoryPermissions);
3032
}
3133

32-
WP_CLI::success("Permissions were successfully updated.");
34+
\WP_CLI::success("Permissions were successfully updated.");
3335

3436
return true;
3537
}

0 commit comments

Comments
 (0)