Skip to content

Check and create .env file from .env.example if missing #77

@DenTray

Description

@DenTray

Description

What needs to be done?

Extend the init console command logic and implement logic that checks if the .env file exists in the project directory. If the .envfile does not exist, create it by copying the contents of .env.example.

Expected Outcome

What is the expected result?

When the script runs, it verifies presence of .env. If .env is missing, it is created with the exact content from .env.example. If .env already exists, no changes are made.

Verification Scenarios

How can this be tested?

  • Delete or rename .env from the project directory.

  • Run the init command.

  • Confirm .env is created with the same content as .env.example.

  • Run the script again with .env present and verify .env is unchanged.

  • Ensure no errors occur during execution.

  • Verify no debug info or errors appear in the console (if applicable).


Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions