Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Mar 13, 2024
1 parent a13b805 commit c5f73be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/src/Environment/ExtensionDownload/ExtensionDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ public function download( EnvInfo $env_info, string $cache_dir, array $plugins =
} elseif ( is_dir( $e->path ) ) {
if ( ! getenv( 'QIT_ALLOW_WRITE' ) ) {
// Set it as read-only to prevent dev messing up their local copy inadvertently (default behavior).

// Inform the user about the read-only mapping
$this->output->writeln( "Notice: Mapping '{$e->type}s/{$e->extension_identifier}' as read-only to protect your local copy." );

// Set it as read-only
$env_info->volumes["/app/wp-content/{$e->type}s/{$e->extension_identifier}:ro"] = $e->path;
} else {
$env_info->volumes["/app/wp-content/{$e->type}s/{$e->extension_identifier}"] = $e->path;
Expand Down

0 comments on commit c5f73be

Please sign in to comment.