Copy entries from a source .env file to a destination .env file, overwriting any existing entries in the destination .env file.
If the destination directory does not exist, a message will be logged and no other action will be taken. Alternatively, to throw an exception
when the destination directory does not exist, set the CopyEnvOptions.throwIfDestinationDirectoryMissing option to true.
If the destination .env file does not exist, it will be created and populated with the source .env file's values.
This is useful for copying values from a root .env file to additional locations (server, client, docker-compose directory, etc.)
throughout your solution so you only have to manage one .env file.
Note that this does not delete any existing entries in the destination .env file, which is useful if you have additional entries in
the destination .env file that you don't want to overwrite.
For copying .env.template files to root .env files, use copyNewEnvValues.
Parameters
sourcePath: string
The path to the source .env file such as a root .env file (use copyNewEnvValues for .env.template files)
Copy entries from a source .env file to a destination .env file, overwriting any existing entries in the destination .env file.
If the destination directory does not exist, a message will be logged and no other action will be taken. Alternatively, to throw an exception when the destination directory does not exist, set the CopyEnvOptions.throwIfDestinationDirectoryMissing option to
true.If the destination .env file does not exist, it will be created and populated with the source .env file's values.
This is useful for copying values from a root .env file to additional locations (server, client, docker-compose directory, etc.) throughout your solution so you only have to manage one .env file.
Note that this does not delete any existing entries in the destination .env file, which is useful if you have additional entries in the destination .env file that you don't want to overwrite.
For copying .env.template files to root .env files, use copyNewEnvValues.