Skip to content

Commit

Permalink
Add a check to prevent calling the script in the browser.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpellenwood committed Jan 3, 2025
1 parent 6eff938 commit dcd90ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dev/scripts/create-local-configs.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
* Generates a local-config.json file using Lando's own environment variables if it doesn't exist.
*/

if ( ! file_exists( '.lando.yml' ) ) {
// This script should only be run from the root of the project, not called directly in a browser.
die();
}

/**
* PHP Local Config
*/
Expand Down

0 comments on commit dcd90ed

Please sign in to comment.