[BUG] `doppler secrets download --format=env .env` writes a base64 encoded file
Describe the bug
doppler secrets download --format=env .env
To Reproduce
- Run
doppler secrets download --format=env .env
Expected behavior It should write a .env formatted file
Screenshots
CLI Version: v3.75.0
Additional context
Hello,
When using doppler secrets download the file will always be encrypted by default, as we don't support downloading an unencrypted file to the filesystem. In our documentation we have an example for storing the file unencrypted, which is not recommended. You would want to use doppler secrets download --no-file --format env > .env for your case,
Generally speaking, the download command is used for generating files that can be used with the --fallback-only --fallback arguments, though that only works with json formatting at this time. While the --format argument is supported, using it with non-default formats must be paired with --no-file to print to stdout in the selected format.
If you're just trying to use the file as a .env in an application, we'd recommend mounting it if possible. Something like the following should work there: doppler run --mount .env --mount-format env -- <command>
I think it should download a non encrypted file if you pass the env format option, that’s a much better user experience.
The mount command doesn’t work for my use case, when starting a development server with Vite the file gets deleted and recreated in a loop.