You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into an issue today, when under impression that dotenv (since it
states that the file can be sources into shell) supports basically POSIX shell.
However, that was actually not so. Main issue is not necessarily the lack of the
functionality (it is and I had to stop using dotenv in our CI), but that the
unsupported syntax is just silently ignored.
Assuming we would be willing to invoke actual shell, I believe it is possible to
support full POSIX range of features. Assuming that would be accepted, I'm
willing to work on such addition. Would it be merged?
Expected behavior
+$ bundle exec ./test.rb
"Z"
Actual behavior
+$ bundle exec ./test.rb
"-Z}"
System configuration
dotenv version:
2.7.6
Rails version:
N/A
Ruby version:
2.7.2
The text was updated successfully, but these errors were encountered:
@graywolf-at-work thanks for reporting the issue. You're right that dotenv only supports a subset of POSIX shell functionality. Most of it has been added over time as people needed different features. It is definitely a bug that unsupported syntax is silently ignored.
I would gladly consider a PR that invokes shell, as long as the current tests continue to pass, and it can be implemented in a way that is supported across all platforms (or at least falls back to current implementation on unsupported platforms).
Steps to reproduce
I've run into an issue today, when under impression that dotenv (since it
states that the file can be sources into shell) supports basically POSIX shell.
However, that was actually not so. Main issue is not necessarily the lack of the
functionality (it is and I had to stop using dotenv in our CI), but that the
unsupported syntax is just silently ignored.
Assuming we would be willing to invoke actual shell, I believe it is possible to
support full POSIX range of features. Assuming that would be accepted, I'm
willing to work on such addition. Would it be merged?
Expected behavior
Actual behavior
System configuration
dotenv version:
2.7.6
Rails version:
N/A
Ruby version:
2.7.2
The text was updated successfully, but these errors were encountered: