Skip to content

Commit

Permalink
Merge pull request #813 from WordPress/fix/unwritable-filesystem
Browse files Browse the repository at this point in the history
Fix PHPCS checks on unwritable filesystems.
  • Loading branch information
felixarntz authored Dec 2, 2024
2 parents bea9cb5 + a2c3ac3 commit 961eb80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/Checker/Checks/Abstract_PHP_CodeSniffer_Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ final public function run( Check_Result $result ) {

// Override installed_paths to load custom sniffs.
if ( isset( $args['installed_paths'] ) && is_array( $args['installed_paths'] ) ) {
Config::setConfigData( 'installed_paths', implode( ',', $args['installed_paths'] ) );
Config::setConfigData( 'installed_paths', implode( ',', $args['installed_paths'] ), true );
}

// Create the default arguments for PHPCS.
Expand All @@ -121,7 +121,7 @@ final public function run( Check_Result $result ) {
}

// Reset installed_paths.
Config::setConfigData( 'installed_paths', $installed_paths );
Config::setConfigData( 'installed_paths', $installed_paths, true );

// Restore original arguments.
$_SERVER['argv'] = $orig_cmd_args;
Expand Down

0 comments on commit 961eb80

Please sign in to comment.