This script converts a .env file to a JSON format. Here's a breakdown of how it works:
- Preprocessing with sed:
sed 's/\r$//' .env
- This command removes carriage returns (
\r
) at the end of each line in the .env file. - It handles both Windows (CRLF) and Unix (LF) line endings.
- This command removes carriage returns (