Sometimes variables in .env contain # so the fix to remove end comment breaks them #524
Labels
No Label
abra
abra-gandi
awaiting-feedback
backups
bug
build
ci/cd
community organising
contributing
coopcloud.tech
democracy
design
documentation
duplicate
enhancement
finance
funding
good first issue
help wanted
installer
kadabra
performance
proposal
question
recipes.coopcloud.tech
security
test
wontfix
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/organising#524
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The fix to
pkg/config/env.go
which strips end comments breaks for example thematrix-synapse
recipe where an auto-join room variable where a channel name is specified as"#example:example.net"
.(we had to work around this by removing the fix temporarily to deploy a matrix-synapse with that configuration).
The Ideal fix would be to parse with quote semantics. A less ideal but much easier fix would be to allow escaping a # in a value with a backslash and unescaping it after stripping comments.
I stumbled across the same bug. But I'm a bit confused, why this fix
be693e9df0
is necessary at all??abra
uses thegodotenv
library and according to the README it can handle comments.I would favor to rely on a robust library to parse env files instead of hacks like splitting the line by
#
I don't think comment removal and modifier parsing can be implemented correctly while using the
godotenv
. We either have to fork it (actually abra already uses a fork) or add the env parsing to abra. See also#535 (sorry didn't see this issue bevore creating the new one)I have the feeling, that using env files is comming to a limit here (without using hacks like modifiers as comments). Using a more structured file format like yaml could solve the problem better i think. This is probably not possible since it would break everything
also reported in #535 (comment), gonna close this one