Sometimes variables in .env contain # so the fix to remove end comment breaks them #524
Closed
opened 2023-10-23 17:23:14 +00:00 by cas
·
3 comments
Labels
Clear labels
abra
awaiting-feedback
backups
bug
build
ci/cd
community organising
contributing
coopcloud.tech
design
documentation
duplicate
enhancement
fedi
fedi-infra
finance
funding
good first issue
help wanted
installer
legal
performance
proposal
question
security
test
wontfix
Everything to do with abra
Ping/pong on comms
Something is not working
Go build related issues
Getting the robots into the mix
Opening this thing up
Contributors stuff
Our main website
Design thinking required
Let's write things together
This issue or pull request already exists
New feature
Democratic decision making
Money things
Anything related to grant funding
Easy start with development
Need some help
Installation related issues
Performance related
Large change which requires feedback & decisin making
More information is needed
Securing our shit
Unit or integration test suite
This won't be fixed
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
iexos
jade (Jade Ambrose)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
renovate-bot (Comrade Renovate Bot)
ripclap
simon
sixsmith (Sixsmith)
stevensting
trav (Trav Fryer)
val (val (he/him))
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: toolshed/organising#524
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The fix to
pkg/config/env.gowhich strips end comments breaks for example thematrix-synapserecipe 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
be693e9df0is necessary at all??abrauses thegodotenvlibrary 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 coop-cloud/organising#535 (comment), gonna close this one