Skip to content

Commit

Permalink
ignore development files on production env
Browse files Browse the repository at this point in the history
Signed-off-by: MarioRadu <[email protected]>
  • Loading branch information
MarioRadu committed Dec 12, 2024
1 parent e2d7f50 commit a9905ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/composer-post-install-script.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function copyFile(array $file): void

function getEnvironment(): string
{
return file_exists('config/development.config.php') ? ENVIRONMENT_DEVELOPMENT : ENVIRONMENT_PRODUCTION;
return file_exists(realpath(__DIR__ . '/../config/development.config.php')) ? ENVIRONMENT_DEVELOPMENT : ENVIRONMENT_PRODUCTION;
}

// when adding files to the below array the `source` and `destination` paths must be relative to the project root folder
Expand All @@ -51,4 +51,6 @@ function getEnvironment(): string

echo "Using environment setting: " . getEnvironment() . PHP_EOL;

var_dump("File exists " . file_exists(realpath(__DIR__ . '/../config/development.config.php')));

array_walk($files, 'copyFile');

0 comments on commit a9905ad

Please sign in to comment.