common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
1.04k stars 93 forks source link

--env sorts the other environment variables in the .env file #442

Open shwethaumashanker opened 1 year ago

shwethaumashanker commented 1 year ago

When you use the --env flag, granted writes into the file and sorts all the variables

shwethaumashanker commented 1 year ago

I looked into the issue and it's because the library we use to write to the .env file sorts the elements. All the other libraries available seem to be sorting the elements as well since they store the variables in a Golang map which is unordered