tilt-dev / tilt-extensions

Extensions for Tilt
https://tilt.dev/
Apache License 2.0
201 stars 159 forks source link

Enhancing dotenv function #498

Closed rrmistry closed 1 year ago

rrmistry commented 1 year ago

Enhancing the dotenv function with few enhancements:

This should resolve https://github.com/tilt-dev/tilt-extensions/issues/444

atta commented 1 year ago

Hi a nice thing to add would be: to also remove the \r on the end of each line if it exist for better windows support

rrmistry commented 1 year ago

Hi a nice thing to add would be: to also remove the \r on the end of each line if it exist for better windows support

The current PR relies on the StarLark function strip.

Looking at the documentation, it seems that when called without any parameters then it removes all whitespace. But it is not explicitly clear if it is \n or \r or both.

A simple task could be to add an explicit test case for this to make sure future breaking changes are caught (if any) for \r character support.

I can update this PR as soon as I get a chance. Thanks for pointing this out @atta !